designing question
Gordon McMillan
gmcm at hypernet.com
Mon Jul 19 09:23:37 EDT 1999
Pierrette writes:
> I have two questions:
> 1. The database will hold abouth 50.000 lines in its biggest table,
> can gadfly handle this without problems, what abouth acces time ??
Gadfly is in-memory, and (to support transactions) has 2 copies of
the db. If the machines have the memory, access time will be fine.
> 2. The application will have abouth 50 different inputscreens wich
> acces all to different tables. I will create a class for every
> window wich inheret from a general 'input-screen'-class. I wonder if
> a should place the db-access code (insert-update-delete) in every
> specific window or if i should create a big db class wich has all
> possible db-acces in it ?
Completely philosophical question. For flexibility, I favor the GUI
making no assumptions about how the data is stored. I would have the
GUI making calls like "app.addthingie(thingie)", where the app has an
"abstract" UI.
Of course, it almost nevers works out that cleanly in practice, but
it's certainly a worthy goal.
Now if each screen maps exactly to a table, this is probably
overkill. But if your data is normalized, this makes a lousy UI -
users usually want to know all kinds of silly things, like whether
there's a "next" record, or the owning customer's name (not the
foreign key in this row, which is just a number) that violate
normalization.
- Gordon
More information about the Python-list
mailing list