473,326 Members | 2,182 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

ORM: from object to SQL

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
Jun 27 '08 #1
3 1557

<da**********@gmail.comwrote in message
news:13**********************************@n1g2000p rb.googlegroups.com...
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.
Jun 27 '08 #2
da**********@gmail.com wrote:
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#)
------------------------------------------------------------------------
Jun 27 '08 #3
On 16 abr, 09:27, "Frans Bouma [C# MVP]"
<perseus.usenetNOS...@xs4all.nlwrote:
dariosalv...@gmail.com wrote:
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
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

Jun 27 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
ORM
by: Nishanthan | last post by:
Hi, Any one used any Object relational Mappings(ORM) in your projects? Anyone have idea of which ORM is better? Regards, P.Nishanthan
3
by: Brenden Bixler | last post by:
I'm developing a large website with a substantial number of large forms - containing 40+ fields each. Writing the INSERT and UPDATE statements by hand is extremely laborious and time consuming. I...
1
by: Nate | last post by:
Modeling of Lookup Values and ORM I know this is not the correct forum for object design patterns, but I haven't found any design related newsgroups. Scenario: Customers (table)...
12
by: Bruce One | last post by:
For all the ORM i have searched around, I have always found two big problems: 1) To update or delete a set of records you must first bring it to memory. If you are inside a loop and have to do it...
3
by: pratham | last post by:
If i understand correct? is strong typed DataSet is ORM implementation by Microsoft? Expecting comments .. please Praveen
6
by: Thierry Lam | last post by:
I was reading the book AJAX in action and it mentions using ORM tools such as PEAR, EZPDO or Metastorage. The ORM is supposed to facilitate data retrieval. Is everyone out there using one of those...
4
by: AliRezaGoogle | last post by:
Dear members, Hi. I am really confused about object-relational mapping (ORM) softwares frameworks designed for .Net. For example I've read some about NHibernate and Spring.NET. Some others like...
1
by: AliRezaGoogle | last post by:
Hi As I know ORM tools encapsulate table rows in objects. In other words we do not see rows or columns, instead we see objects with properties. But there are some GUI components that work with...
4
by: Wolfgang Keller | last post by:
Hello, so far it seems to me as if the only ORM module for Python which supports composite primary/foreign keys was SQLAlchemy. Which looks a little bit "overbloated" for my needs: I "just" need...
1
by: thesti | last post by:
hello, i usually simply use DataAdapter or DataReader to get data from database.now, i'm thinking to use ORM to help ease OO development. but then because i have the need to display the data...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.