ORM: from object to SQL

  • Thread starter Thread starter dariosalvi78
  • Start date Start date
D

dariosalvi78

Hi,

I am exploring the object-relational mapping tools (the free ones) for
the .net CF 2.
As far as I have seen all the tools start from the tables of a
database and generate code to build persistent classes.
I would like to know if there is some tool that does the opposite:
starting from an object (a class) it generates the tables in the
database and makes the class persistent. Using reflection it shouldn't
be so difficoult.


Dario
 
Hi,

I am exploring the object-relational mapping tools (the free ones) for
the .net CF 2.
As far as I have seen all the tools start from the tables of a
database and generate code to build persistent classes.
I would like to know if there is some tool that does the opposite:
starting from an object (a class) it generates the tables in the
database and makes the class persistent. Using reflection it shouldn't
be so difficoult.

I worked at a company as a consultant that had an object code generator
in-house written called the Object Code Generator. You would build the Bus
Object with Attributes around the accessor proprieties' private variables.

It would build the DAL, create the tables in the SQL Server database with
primary keys, foreign keys and everything, and it linked the objects
together. You could run an object mapper against the objects to see the
relationships.

Of course, it had its own Database engine to use the objects and the
database tables. Actually, it was fabulous. Maybe, there is one out there
some company has written, or roll your own.
 
Hi,

I am exploring the object-relational mapping tools (the free ones) for
the .net CF 2.
As far as I have seen all the tools start from the tables of a
database and generate code to build persistent classes.
I would like to know if there is some tool that does the opposite:
starting from an object (a class) it generates the tables in the
database and makes the class persistent. Using reflection it shouldn't
be so difficoult.

It doesn't matter where you start with. The 'class' is also a
projection of an abstract entity definition, the same goes for the
table definition. After all, if you write a 'Customer' class, you don't
base that class on fantasy or the direction of the wind or the room
temperature, but on analysis results about what attributes are defined
with a 'customer'. Exactly that same information is used to build
tables.

FB

--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
 
It doesn't matter where you start with. The 'class' is also a
projection of an abstract entity definition, the same goes for the
table definition. After all, if you write a 'Customer' class, you don't
base that class on fantasy or the direction of the wind or the room
temperature, but on analysis results about what attributes are defined
with a 'customer'. Exactly that same information is used to build
tables.

FB

That's true actually. The data model it's a model, then you can
formalize it the way you prefer. Mine was a concern about languages: I
would prefer dealing with ONLY Csharp, and forgetting about SQL.

Anyway I am using MyGeneration now (quite tweaky to compile it
under .NetCF 2, if someone needs help I am here to give suggestions !)

Thanks to you all.

Dario
 
Back
Top