Relative Content

Tag Archive for orm

compare different approachs for saving related records whose values may change

On a web application for accounting services, I have the good old Invoice. To keep this example as simple as possible, each Invoice has many rows, and each row has its item with its price.
At the beginning, the prices of the items are read from a PriceList table.
Each time an invoice is emitted, i store the the key of the item of the PriceList table in my InvoiceRows table.
But prices in PriceList table may change (and often do so) so I’ve put a price field in the InvoiceRows table, that will contain a copy of the price.
I’ve managed all this through an ORM (actually i use rails ActiveRecord) but Hibernate would be more or less the same. So my ORM binds some classes, say Invoice and InvoiceRow to the related database tables. Both of them have a save method that persists the data on the database.

Stored Procedures, ORMs and other application layers

I’m just starting out on a project to develop a new, fairly substantial web application which has an underlying MSSQL database. We’re hiring a team of developers to write the application (in .NET) and I’m building the database (I’ve actually already started).

Stored Procedures, ORMs and other application layers

I’m just starting out on a project to develop a new, fairly substantial web application which has an underlying MSSQL database. We’re hiring a team of developers to write the application (in .NET) and I’m building the database (I’ve actually already started).

Entity Framework and separating DAL from domain entities

If I have a normalized db, it’s unlikely to map 1 to 1 with my domain entities. So I customize my EF entities to fit the domain. But now my EF entities are essentially my domain entities and my DAL is baked into my business objects.

Entity Framework and separating DAL from domain entities

If I have a normalized db, it’s unlikely to map 1 to 1 with my domain entities. So I customize my EF entities to fit the domain. But now my EF entities are essentially my domain entities and my DAL is baked into my business objects.