0
votes
1answer
34 views

Real time middleware system: Direct DB access vs REST API access

I'm developing a complex environment which involves a web application, a mobile app and a real time middleware system which accesses the DB for on-site tag readings. Currently, the web application ...
2
votes
1answer
84 views

Finding a way to simplify complex queries on legacy application

I am working with an existing application built on Rails 3.1/MySql with much of the work taking place in a JavaScript interface, although the actual platforms are not tremendously relevant here, ...
0
votes
1answer
73 views

DB Design: How to link a single column to a collection of entities

I have a db design question that I am sure has been quite extensively covered but I cannot find a good answer already. The problem is how to efficiently link a single school course to a collection ...
7
votes
1answer
982 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 ...
1
vote
2answers
128 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
409 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 ...
4
votes
3answers
162 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
394 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 ...
0
votes
2answers
375 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 ...
5
votes
1answer
386 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 ...
5
votes
3answers
592 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
3answers
764 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
153 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 ...
1
vote
2answers
209 views

ORM has schema to generate classes, does the reverse exist? [closed]

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, ...
12
votes
5answers
761 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 ...
1
vote
2answers
272 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
297 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
1answer
156 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 ...
3
votes
8answers
1k 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 ...
2
votes
1answer
123 views

Big table with referential integrity or field typification?

I'm using an ORM (Propel) and PHP to create Objects and store them in a database. So, I'm facing a recurrent problem and I'm pretty sure this happened to someone before. My data model looks something ...
4
votes
4answers
1k views

When is it necessary to use ORM tools?

I was raised in a part of web developmentland where the creation of websites is mostly synonymous with Wordpress, FTP, Joomla, and procedural code, instead of things like TDD, A/B testing, Doctrine, ...
6
votes
4answers
3k views

What are some best practices for populating and using a test database?

So, I'm developing some database-driven RESTful Java web services, using Hibernate and MySQL. For testing purposes, I'm using the H2 in-memory database. H2 is nice and fast, so this has worked out ...
22
votes
7answers
5k views

How to suggest using an ORM instead of stored procedures?

I work at a company that only uses stored procedures for all data access, which makes it very annoying to keep our local databases in sync as every commit we have to run new procs. I have used some ...
1
vote
2answers
252 views

How does an agile process deal with ORM?

This question was prompted by this answer, where I quote,"agile + ORM on a large constantly changing database is brutal". So, how can an agile process deal with a constantly changing database? I am ...
3
votes
5answers
1k views

Do you test your SQL/HQL/Criteria?

Do you test your SQL or SQL generated by your database framework? There are frameworks like DbUnit that allow you to create real in-memory database and execute real SQL. But its very hard to use(not ...
12
votes
3answers
715 views

Does ORM promote database de-normalisation?

Doctrine and Propel both make use of single and concrete table inheritance to map object relationships. The former sees all possible fields in the class tree mapped to a single table - whereas the ...
12
votes
4answers
1k views

What would you think about a new Java persistence tool, that's not really an ORM? [closed]

Persistence in Java Over the past years, I have gathered experience in the field of persistence abstraction in Java, using concepts such as EJB 2.0, Hibernate, JPA and home-grown ones. They seemed to ...