Message-ID: <1102388172.301409.1369127508011.JavaMail.firstname.lastname@example.org> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_301408_91678953.1369127508011" ------=_Part_301408_91678953.1369127508011 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Gentle.NET lets you work wit= h relational databases without using SQL directly.
See this basic example= from the Gentle.NET user guide. I have converted it to boo below.
Gentle.NET is an object-relational mapper (ORM). ORMs translate your cl= asses and objects into SQL commands for storing those objects and retrievin= g them from a relational database.
Contrast that with object-oriented databases that store objects directly= without using any SQL (like ZODB in Python). See db4objects and B= amboo Prevalence for examples of using those.
Use a relational database engine (be it Firebird, MySQL, MSSQL, etc.) to= design your tables (see Database = Design), and then create the classes that correspond to those tables.= p>
You can also use the free MyGeneration code generatio= n tool to generate those Gentle.NET classes for you automatically (in C#, w= hich you can then convert to boo using SharpDevelop).
See the NHibernate page for a re= cipe using the NHibernate ORM. Being based on an existing Java tool, NHibe= rnate probably has or will have a larger user base than Gentle.NET. But so= far I like how Gentle.NET uses [attributes] instead of XML to define the m= appings between objects and the database (see the example below, although y= ou still need to create a general XML configuration file with info like the= connection string).
I have been experimenting with using Firebird, MyGeneration, and Gentle.= NET with boo. I'll post some examples later.
This sample code has not yet been tested, but is provided for illustrati= on:
Go back to Database Recipes.------=_Part_301408_91678953.1369127508011--