Home All Groups Group Topic Archive Search About

Object-to-Relational Tool

Author
7 Jun 2006 2:20 PM
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.

Author
7 Jun 2006 2:31 PM
sh
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

sh wrote:
Show quoteHide quote
> 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.
Author
8 Jun 2006 3:14 AM
GhostInAK
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

Show quoteHide quote
> 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
>
> sh wrote:
>
>> 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.
>>
Author
8 Jun 2006 2:54 PM
Jim Wooley
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

Show quoteHide quote
> 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
>
>> 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
>>
>> sh wrote:
>>
>>> 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.
Author
8 Jun 2006 9:35 AM
Larry Lard
sh wrote:
> sh wrote:
> > 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.

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 :)

--
Larry Lard
Replies to group pleas