Object-to-Relational Tool

  • Thread starter Thread starter sh
  • Start date Start date
S

sh

I am working on a database project, and I'm trying to think
"objectively". Are there any tools that will map my "objects" to
relational tables? I'd prefer a freebie, or something faily low-cost to
start off.

Thanks for any assistance.
 
I'd like to clarify my question.

The SQL Server database has **not** been created yet. I am planning it.
But I would like the DB to reflect "objects" as best as possible. So I
would like a tool where I could describe my objects, and it would then
show me what would be the best "relational" model to reflect them.

Thanks
 
Hello SH,

This would be a fairly simple tool to write yourself.

Look into the System.Reflection namespace.

Basicly you'll feed the object graph to the tool.. it'll walk over the classes,
creating tables, and walk over the properties creating fields.
This is a super simplified description, but given a week or two a competent
programmer could build this tool easily.

-Boo
 
NHibernate and db40 are both free, though might be a little
intimidating. Rolling your own is an option for small projects.
I'd like to clarify my question.

The SQL Server database has **not** been created yet. I am planning it.
But I would like the DB to reflect "objects" as best as possible. So I
would like a tool where I could describe my objects, and it would then
show me what would be the best "relational" model to reflect them.

Oh, OK. This kind of thing can't really be delegated to automated tools
- the details of a correct O/R mapping still require actual thought. I
suggest you go and have a read of <http://www.agiledata.org>, maybe
start at <http://www.agiledata.org/essays/mappingObjects.html> and see
how you get on. This is a big topic :)
 
Why bother writing it yourself when there are plenty of free (and commercial)
Object Relational Mappers out there, including NHibernate which is probably
the most widely documented (assuming you can read JAVA documentation for
the Hibernate version). Microsoft is working on their stab into this arena
with DLINQ which is targeted at the Orcas release timeframe which may be
too far out for you at this point.

That being said, it is often a mistake to mismatch relation and Object relational
techniques. I recommend reading Object Thinking by David West.

Jim Wooley
http://devauthority.com/blogs/jwooley/default.aspx
 
who gives a flying crap about OOP?

throw away your program; design the database first and then re-write
your silly little app from the ground up.
 
Back
Top