[Nitro] a 'database' entity?
zimba.tm at gmail.com
Sat Jun 10 08:54:37 EDT 2006
== Class for Database representation
Og uses some database as a store for the various datas. By defining
entities, you define the structure of what you want to store in the
database. Looking like this, the database is only usefull to put and
retrieve the datas.
A database representation is already done in Og when you start an
Og::Manager. I think this is a better approach than using a class for
the following reasons :
* Tables that are not managed by Og are not interesting because not
usable in Og
* It would make things more static. The database name is something
you want to change more often (eg. different environment like debug or
Naturally, the database class could have an extra attribute to tell
it's database name. But you'll have to write extra code for that class
all the time without having a real benefit. Or I missed the point. cf.
What I think is the next thing to do is cross queries. Og (and AR)
transform the relational database into a hierarchical database. Where
objects belongs_to other objects, ... In some cases it make it hard /
inefficient to consilitate datas in different entities.
More information about the Nitro-general