Object-relational mapping (ORM) is a technique for mapping between object-oriented systems and relational databases.
3
votes
5answers
174 views
What are the disadvantages of using stored procedures, SSIS, and SSRS to implement business applications?
Recently, it was suggested that many projects (where I work) should be implemented using some combination of stored procedures (on SQL Sever / T-SQL), SSIS, and SSRS.
In one specific project, SSIS ...
0
votes
2answers
73 views
What is the convention regarding class names that may already exist in the ORM?
This is a generic question about class names and ORMs, but for context; I'm working on a Flask web app in Python using SQLalchemy.
I'm struggling with naming a new class that will contain the ...
1
vote
1answer
114 views
Using a DAO to abstract our ORM from the rest of the application
We're using MySQL with Sequelize.js as the ORM.
What we're wondering is whether a DOA layer of abstraction is worthwhile. Here are our options:
To use the Sequelize models throughout the ...
0
votes
2answers
171 views
Mapping a legacy database to ORM using wrapper classes
I want to use an ORM with a legacy database, but I don't want to expose some of the underlying data types. For example, some of the columns are nullable doubles or floats and I want my domain model to ...
0
votes
2answers
170 views
What is the equivalent of Entity Framework in the world of Oracle shops? [closed]
Within the world of developers/firms specializing in building/deploying solutions built around software built/sold by Oracle (aka "Oracle houses"), what ORM middleware is considered as the "industry ...
0
votes
1answer
91 views
What is a good design for a container, assignment and items
------------- 1 * -------------- * 1 --------
| Container |--------| Assignment |-----------| User |
------------- -------------- --------
^ ...
4
votes
1answer
102 views
Should I Use an ORM only when dealing with Data Model objects?
I am new to ORM, and we started developing a new system using NHibernate as the ORM.
I think this question may refer to any ORM and any language/platform.
The Team Leader has said we should use ...
2
votes
1answer
126 views
Sorting rows off an autoincrementing primary key
Is it a bad practice to rely on an auto-incrementing primary key to sort rows in a table? A coworker and I were having an argument about this subject. We need to be able to find the last-inserted row ...
4
votes
3answers
216 views
How do ORM'S manage CRUD operations in multi thread environment
Suppose I have code which retrieves an object and modifies it and submits it via any ORM from a web application. Below is the pseudo code:
First request
var objCust = ...
1
vote
1answer
131 views
ORM: Keep entities coherent in a cache or retrieve entities each time?
We have a tricky question in a project using Java & Hibernate, with a model containing bi-directional relationships.
As it's a small project with few users, few entities, and few rows involved in ...
5
votes
1answer
179 views
Entity Framework as a type checking/verification system for database code
When I read pro and con lists of using Entity Framework (or any modern ORM really), I'm surprised that the following point doesn't arise (self quote):
Using strongly-typed domain entities allows ...
2
votes
2answers
331 views
Do we achieve 100% Persistence Ignorance solution if we're not using ORM's POCO objects to model the Domain?
Persistence ignorance is ability to retrieve/persist standard objects, where standard objects are considered as classes focused on particular business problem and thus don't contain any ...
6
votes
6answers
673 views
OOP Design: relationship between entity classes
I have at first sight a simple issue but can't wrap my head around on how to solve. I have an abstract class Compound. A Compound is made up of Structures. Then there is also a Container which holds 1 ...
0
votes
0answers
99 views
Benchmarking ORM associations
I am trying to benchmark two cases of self referential many to many as described in datamapper associations. Both cases consist of an Item clss, which may require many other items. In both cases, I ...
6
votes
4answers
215 views
Where ORMs blur the lines between code and data, how do you decide what logic should be a stored procedure, and what should be coded?
Take the following pseudocode:
CreateInvoiceAndCalculate(ItemsAndQuantities, DispatchAddress, User);
And say CreateInvoice does the following:
Create a new entry in an Invoices table belonging to ...
5
votes
3answers
391 views
Should we have a database independent SQL like query language in Django?
Note :
I know we have Django ORM already that keeps things database independent and converts to the database specific SQL queries.
Once things starts getting complicated it is preferred to write raw ...
9
votes
1answer
501 views
Classless tables possible with Datamapper?
I have an Item class with the following attributes:
itemId,name,weight,volume,price,required_skills,required_items.
Since the last two attributes are going to be multivalued, I removed them and ...
7
votes
3answers
355 views
Creating a layer of abstraction over the ORM layer
I believe that if you have your repositories use an ORM that it's already enough abstracted from the database.
However, where I am working now, someone believe that we should have a layer that ...
5
votes
2answers
109 views
Database Change Auditing - Part of or Abstracted from ORM / Application Layer?
My fellow developers and I are at a crossroads in how to go about continuing our auditing of database changes.
Most of our applications log changes via INSERT, UPDATE, and DELETE triggers.
A few of ...
19
votes
4answers
2k views
Entity Framework with large systems - how to divide models?
I'm working with a SQL Server database with 1000+ tables, another few hundred views, and several thousand stored procedures. We are looking to start using Entity Framework for our newer projects, and ...
1
vote
5answers
1k views
Externalising SQL Queries in Java
What are the advantages and disadvantages of externalising SQL queries in Java (or similar general-purpose object-oriented programming language. Externalizing means storing all SQL in a separate ...
3
votes
3answers
409 views
How do I make code bound to an ORM testable?
In Test Driven Development, how do I make code bound to an ORM testable?
I am using a Micro-ORM (PetaPoco) and I have several methods that interact with the database like:
AddCustomer
UpdateRecord
...
5
votes
2answers
273 views
Returning an IQueryable from an IRepository
Using the Repository pattern, is it proper to return an IQueryable of a data set (table), for generic usage?
It is very handy in many cases, especially when using external libraries that leverage ...
3
votes
1answer
240 views
What is the best way to use inheritance with ORMs?
If I have a People table and those people can be at different addresses, and each address can have more than one person, thats a many-to-many relationship.
So, using ORMs like Entity Framework and ...
4
votes
5answers
3k views
What are the advantages of myBatis over Hibernate?
This question originates from a comment I received on one of my questions -
I'd rather drop hibernate in favor of mybatis instead of jdbc
I've done some research on my own and understand the ...
3
votes
1answer
725 views
is it possible to auto-generate annotated POJO from a table
I wonder is it possible or is there a tool to generate annotated POJOs from a table.To make it clear,for example,Person table has fields like ,id,name,surname etc and i wanna to generate a POJO named ...
1
vote
1answer
294 views
Abstraction Layer over ORM Generated Entities
I am learning LINQ to SQL (and planning to learn Entity Framework). Initially I used a abstraction layer to convert LINQ to SQL entities into a domain objects. Later I discovered the “Inheritance ...
1
vote
1answer
154 views
Are separate business objects needed when persistent data can be stored in a usable format?
I have a system where data is stored in a persistent store and read by a server application. Some of this data is only ever seen by the server, but some of it is passed through unaltered to clients.
...
7
votes
2answers
2k views
Does it make sense to use ORM in Android development?
Does it make sense to use an ORM in Android development or is the framework optimized for a tighter coupling between the UI and the DB layer?
Background: I've just started with Android development, ...
2
votes
2answers
189 views
ORM and component-based architecture
I have joined an ongoing project, where the team calls their architecture "component-based". The lowest level is one big database. The data access (via ORM) and business layers are combined in various ...
2
votes
2answers
142 views
ORM has schema to generate classes, does the reverse exist?
In Entity-Framework, you can create a DB schema, and then generate your ORM classes. Is there any software that does this in reverse? For example you create a few classes that have relationships, ...
4
votes
1answer
251 views
What is Rainbow (not the CMS)
I was reading this excellent blog article regarding speeding up the badge page and in the last comment the author waffles (a.k.a Sam Saffron) mentions these tools:
dapper and a bunch of custom ...
9
votes
2answers
455 views
Non-blocking ORM issues
I asked a question on SO, and found that there are no non-blocking ORMs for my favorite web framework. By non-blocking I mean an ORM with callback support for asynchronous retrieval. The ORM would be ...
10
votes
5answers
550 views
For an ORM supporting data validation, should constraints be enforced in the database as well?
I have always applied constraints at the database level in addition to my (ActiveRecord) models. But I've been wondering if this is really required?
A little background
I recently had to unit test a ...
0
votes
2answers
218 views
Will TSQL become useless because of new ORMs? [closed]
By introducing LINQ to SQL, I found myself and my .NET developer colleagues gradually moving from TSQL to C# to create queries on the database. Entity Framework made that shift almost permanent.
Now ...
2
votes
4answers
221 views
Should OO design, or database design, drive the coding of my @Entity classes?
I have two classes that I want related to each other in an JEE application using JPA2. In an OO world, I would say that a Chatroom has an attribute List messages. In the relational world composition ...
-3
votes
3answers
480 views
Is there really Object-relational impedance mismatch?
It is always stated that it is hard to store applications objects in relational databases - the object-relational impedance mismatch - and that is why Document databases are better.
However, is there ...
2
votes
1answer
329 views
Basic design of a data access layer using the DataMapper pattern
I'm trying to understand the DataMapper pattern by implementing it myself for one of my domain objects.
So far, I have:
class MyDomainObject
<attributes>
<business logic methods>
...
3
votes
4answers
501 views
In Search of Automatic ORM with REST interface
I have this wish that so far Google hasn't been able to fulfill. I want to find a package (ideally in PHP, because I know PHP, but I guess that's not a hard requirement) that you point at a database, ...
1
vote
3answers
582 views
Thick models Vs. Business Logic, Where do you draw the distinction?
Today I got into a heated debate with another developer at my organization about where and how to add methods to database mapped classes. We use sqlalchemy, and a major part of the existing code base ...
2
votes
2answers
170 views
Does SRP with ORM provoke SOA?
Sorry about the many abbreviations in the title... My observation is that applications built with an object-relational mapping like Hibernate tend to follow a service-oriented architecture instead of ...
16
votes
5answers
656 views
Do ORMs enable the creation of rich domain models?
After using Hibernate on most of my projects for about 8 years, I've landed on a company that discourages its use and wants applications to only interact with the DB through stored procedures.
After ...
7
votes
5answers
2k views
When not to use ORM and prefer stored procedures?
I am using PetaPoco micro-ORM. It is indeed very easy and secure to work with databases using ORM tools, but the only thing I hate is extra code. I used to put most of the code in the database itself ...
2
votes
1answer
58 views
Is there any scenario where it's useful to keep mutable properties cached in domain objects for anything else than informational purposes?
Usually in a domain model, you'll have objects, and those objects will have properties that are mutable and properties that are immutable - for instance, a instance id/name will be immutable, while ...
1
vote
2answers
214 views
Pro's/Con's to database table layout as it relates to maintenance & extensibility
Basic pseudo class layout below...
class Location(): # Class containing information about a location.
id
address_one
class CustomerLocation(Location):
customer_id
account_rep
class ...
5
votes
2answers
247 views
Immutable design with an ORM: How are sessions managed?
If I were to make a site with a mutable language like C# and use NHibernate, I would normally approach sessions with the idea of making them as create only when needed and dispose at request end. ...
3
votes
2answers
1k views
How can I design a model layer without ORM, and when should I use it?
I'm a PHP developer who started with CodeIgniter. In it, designing models was easy: it seemed like each method defined in models was the equivalent of static methods in a normal, objected-oriented ...
3
votes
1answer
134 views
Who's responsible for a master / slave switch?
We are introducing a master / slave replication schema in our web application. At certain scenarios we would prefer to explicitly direct reads to a slave and writes to the master, which to me is an ...
0
votes
4answers
239 views
To which layer does this code belong?
When I say "Revisional Data Model", I mean a data model where information is never lost: Deletes never destroy any rows, and updates always cause an insert somewhere else to preserve a row's previous ...
3
votes
6answers
613 views
Why are SQL databases still used with ORM?
ORMs and persistence ignorance make perfect sense: if I am programming in a language, then I want to use the language's native implementation of objects and data structures to drive my program. I ...
