473,788 Members | 2,725 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1582

<da**********@g mail.comwrote in message
news:13******** *************** ***********@n1g 2000prb.googleg roups.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**********@gm ail.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.usenet NOS...@xs4all.n lwrote:
dariosalv...@gm ail.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
2101
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
1894
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 can't simply bind to a datagrid -- each form is wrapped in a custom design and extensive business and presentation logic prevents me from using generic controls. Instead, I'm writing SQL Statements and passing each field as a separate command...
1
1877
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) ----------------- CustomerID
12
2397
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 n times, then you have to query this set n times as well. Would be nice if ORM could make it easier (in a strongly type manner) to call a dynamic query to directly update/delete records. 2) I have noticed all ORM work with collection as thei...
3
2080
by: pratham | last post by:
If i understand correct? is strong typed DataSet is ORM implementation by Microsoft? Expecting comments .. please Praveen
6
3751
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 ORM tools?
4
5756
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 ObjectMapper seem to be interesting. Is there any one how can compare these frameworks and guide me choose the best one? Best Regards
1
1324
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 dataTables and dataRows. As an example a datagrid. A datagrid needs a dataSet or dataTable to show it's content. However my question is about these components. Working with ORM tools (like NHibernate) how can I feed objects (which are managed by ORM...
4
2971
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 to be able to define a "logical model" (à la UML) in Python and have the ORM connect to a database (running on PostgreSQL in my case) which uses a corresponding (pre-defined) "physical model" as its schema. Modeling really does look exactly...
1
1608
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 in a DataGridView, filling query result to a DataTable from a DataAdapter is simple enough. i don't know if it's better to use ORM or not. is filling data generated from ORM to a DataGridView is simple enough? if the ORM framework used is...
0
9656
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9498
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10366
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9967
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4070
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.