Object-relational mapping (ORM) is a technique for mapping between object-oriented systems and relational databases.
0
votes
0answers
30 views
Benefits of using object document mapping (ODM)
I am creating a web app on Flask and was planning to use mongodb. Most of the examples using this stack that I've come across have used an ODM of some kind and was wanting to figure out whether or not ...
0
votes
1answer
47 views
Audit trails and entity relationships
I'm working on an order system and implementing an audit log. Two main concerns are:
1) While auditing a line item , you should only see audits for the line item
2) While auditing an order, you ...
0
votes
0answers
41 views
Separating Db from business with Inherited classes using multiple views
I have a software that has a car model that will be used in different views (listing, ads, detail page, carousel, up sell widget,etc).
class CarModel extends DbModel{
}
I look for a "nice way" (a ...
1
vote
2answers
127 views
Setter Validation can affect performance?
In a scenario where you use an ORM to map your entities to the DB and you have setter validations (nullable, date lower than today validation, etc), every time the ORM gets a result, it will pass into ...
5
votes
1answer
291 views
Is inline SQL still classed as bad practice now that we have Micro ORMs?
This is a bit of an open ended question but I wanted some opinions, as I grew up in a world where inline SQL scripts were the norm, then we were all made very aware of SQL injection based issues, and ...
4
votes
3answers
262 views
When to use repository pattern
I have read recently that it is not good practice to use the repository pattern in conjuntion with an ORM, from my understanding this is because the abstraction they provide over the SQL database is ...
3
votes
1answer
82 views
ORM: Design of the service layer
I'm currently writing a medium sized web-application and find myself asking this question many times.
For example, let's say there are users, which have files (one-to-many). How should the UI access ...
1
vote
1answer
50 views
When using an ORM should mappings be defined in the code file?
Doctrine offers three ways to define the object mapping properties: in XML, in YAML and as inline docblock annotations in the code. The Doctrine documentation doesn't give any advice on choosing ...
0
votes
1answer
33 views
raw aql query in framework with Active Record pattern based ORM
I use yii framework that implements Active Record pattern as ORM base. It has CActiveRecord class that is a table wrapper class with attributes reflecting table columns. So each object of this class ...
5
votes
4answers
360 views
Performance related doubt in Java with Hibernate
Suppose in some ORM based project (say Hibernate) I am trying to fetch only few columns rather then the whole Object with may be more than 20 attributes. I am writing HQL like "select attr1, attr2 ...
1
vote
2answers
102 views
Getting related foreign keys from parent entities
I'm thinking about a design issue which affects my project's data base. Supposing there are three diferent tables:
CLIENT
ORDER
PACKING_SLIP
Each order has its client and different packing ...
2
votes
2answers
183 views
NHibernate and complex domain model against a legacy database
I'm trying to refactor (actually, rewrite) an application which currently uses only stored procedures to access the database (hundreds of SPs). My goal is to use Nhibernate and follow a good design as ...
3
votes
1answer
136 views
What specific features of NHibernate cause it to be recommended for legacy database systems?
So, I've been evaluating Entity Framework and NHibernate (I'm not looking for an EF vs. NH battle here, though!).
One thing that I see come up very often is that NHibernate is recommended for ...
4
votes
3answers
143 views
What is a good rule-of-thumb for naming link-tables?
In the same way that a publication table might relate to a person table via subscriptions, or a company table might relate to a person table via employee, I'm wondering if there is a descriptive way ...
1
vote
1answer
248 views
Anything beneficial from ORM for a NodeJS project already plain-SQL-implemented?
Well, actually it's a assignment project and I've already implemented a simple yet functional forum with NodeJS. But now we've been required to use ORM frameworks to refactor part of your code worth ...
3
votes
5answers
2k 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
108 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
305 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
255 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
224 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
104 views
What is a good design for a container, assignment and items
------------- 1 * -------------- * 1 --------
| Container |--------| Assignment |-----------| User |
------------- -------------- --------
^ ...
4
votes
1answer
123 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
163 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
313 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
160 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
246 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
734 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
863 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
106 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 ...
5
votes
4answers
235 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
482 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 ...
8
votes
1answer
582 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 ...
6
votes
3answers
528 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
133 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 ...
22
votes
4answers
4k 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
2k 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
598 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
433 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
271 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 ...
8
votes
5answers
7k views
What are the advantages of myBatis over Hibernate?
I've done some research on my own and understand the basic concept. But some insights can only be gained through actual experience.
What are the advantages of myBatis that would make it worth ...
2
votes
1answer
1k 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
347 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
197 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.
...
11
votes
2answers
3k 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
223 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
165 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
344 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
467 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 ...
11
votes
5answers
626 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
253 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 ...