Clean and simple database modeling

Notice: This thread is very old.
SantaFox
Member | 1
+
0
-

Hello friends,

Thank you for this very frameworks. It's hard a little to understand google-translated documentation, but… It's ok :)
Please give me some guidelines for database modeling. Of course I have seen all possible examples on “Cookbook” but I still don't understand the following:

  1. Nette has a built-in support for many things – why database models loader isn't implemented in core framework?
  2. Is it ok that we have to use a lot of code to get the only $database object?
  3. Is there a “recommended” up-to-date solution that demonstrates exec/query and NotORM models? I don't mean separate code snippets of using NotORM in templates :)

Thank you again!

Schmutzka
Moderator | 1114
+
0
-

Hello,
welcome to Nette. Be sure it brings you lot of joy, though sometimes sweat instead :)
I'll give you some basic answers, so you could continue.

  1. Database implementation could be very individual (simple model, 5-layer model, Doctrine, Dibi, NotORM…), therefore only Nette Database implementation is pre-set as basic. But you are writing about NotORM, let's get to that.
  2. Yes, it is ok. I was surprised too, at first. :) It's the same paradigm as framework: you write a lot code, so you in the future you could write much less to accomplish same effect.
  3. I will point you to Czech tutorial exactly about this topic:

If you know sql or some other db “framework”, this table of queries might help you.

Good luck!

Last edited by Schmutzka (2012-03-24 20:58)