[Koha-devel] [DISCUSSION] Database schema & coding guidelines

Marc Balmer marc at msys.ch
Sat Jun 9 11:54:26 CEST 2012


Am 06.06.12 21:24, schrieb Kyle Hall:
> My favorite solution is to use DBix::Class. With the proper mappings
> only keys should really need to be unique. Eventually, the table
> classes could in theory hold much of the model code that is in various
> C4 modules, in an object-oriented manner.

We have to be careful when introducing ORM-like concepts not to loose
beneficial features of the underlying database.  More often than not a
database abstraction layers lead to a situation where we can only use
the common subset of the databases being used, loosing the advanced
features a database server might have to offer.

And in a complex database based application you most probably want to
make use of such features (and yes, without knowing, we do so when using
e.g. the MySQL query cache).

In practice that means that applications running on multiple databases
will have in some cases different code paths for the respective
databases.  Or using different SQL.


More information about the Koha-devel mailing list