Subject | Re: [firebird-support] DB/OO Modeling |
---|---|
Author | Alexandre Benson Smith |
Post date | 2003-09-18T21:09:33Z |
Ola Martin !
I think when OODB gets matured I will be happy forever.... But, I don't
think this will happen in short time... The big problem (IMHO) in using OOP
technics and SGBD's is make the object-db mapping...
What we do here is:
1.) Model tables using a pseudo-oo paridgm (always normalize the data,
create "ancestral" tables and specialized ones and try to mimic and OO design).
2.) We use datasets to edit/insert data (as you do)
3.) We developed a Framework to map our objects to tables and fields in the
DB. We have for each table (and sometimes a collection of tables) the
"bussiness object" that has all the logic (business logic) all coded in OOP
(polymorphism, inheritance, etc...), this layer maps the properties to
fields in the tables and methods (update, delete, insert, copy, recalc,
convert, etc) execute a serie of SQL statments (insert,update, delete) to
DBMS. These objects has "Key Properties" that select data from DB and
populate the object when changes. This way we do all programming using
these objects and they automagically updates the DB.
4.) The reports are made with Crystal Reports (here is where we have the
most dificult, since we cannot use our business objects to calc, search,
etc the data on the database)
5.) We now use 2 tier (classic C/S system, not so classic since most logic
is in the bussiness objects and not in triggers and SP's, FB hanldes data
integrity, and some basic stuff (recalc totals on delete and on changes of
fields values, but most logic is on cliente-side)), but we could (and will
do sometime) make the business objects be the middle tier, and can convert
in an "easy" way our system to 3 tier.
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda.
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br
At 14:17 18/09/2003 -0300, you wrote:
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.514 / Virus Database: 312 - Release Date: 28/08/2003
[Non-text portions of this message have been removed]
I think when OODB gets matured I will be happy forever.... But, I don't
think this will happen in short time... The big problem (IMHO) in using OOP
technics and SGBD's is make the object-db mapping...
What we do here is:
1.) Model tables using a pseudo-oo paridgm (always normalize the data,
create "ancestral" tables and specialized ones and try to mimic and OO design).
2.) We use datasets to edit/insert data (as you do)
3.) We developed a Framework to map our objects to tables and fields in the
DB. We have for each table (and sometimes a collection of tables) the
"bussiness object" that has all the logic (business logic) all coded in OOP
(polymorphism, inheritance, etc...), this layer maps the properties to
fields in the tables and methods (update, delete, insert, copy, recalc,
convert, etc) execute a serie of SQL statments (insert,update, delete) to
DBMS. These objects has "Key Properties" that select data from DB and
populate the object when changes. This way we do all programming using
these objects and they automagically updates the DB.
4.) The reports are made with Crystal Reports (here is where we have the
most dificult, since we cannot use our business objects to calc, search,
etc the data on the database)
5.) We now use 2 tier (classic C/S system, not so classic since most logic
is in the bussiness objects and not in triggers and SP's, FB hanldes data
integrity, and some basic stuff (recalc totals on delete and on changes of
fields values, but most logic is on cliente-side)), but we could (and will
do sometime) make the business objects be the middle tier, and can convert
in an "easy" way our system to 3 tier.
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda.
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br
At 14:17 18/09/2003 -0300, you wrote:
>I don't know if what I'd like to do is viable using the tools availablesnip...
>out there.
>
>Usually, as many developers do, I create my database models using ERD
>(Entity Relationship Diagram) After that, in my applications I access the
>database through dataset components. That's the tradittional way, I guess.
>
>In my apps, I always tried to favor OO aproaches, like visual and
>componentes inheritance, etc... So, I'm confortable on using OO techniques.
>
>But I'd like to model my database on a OO approach too. For example,
>creating tables hierarchy, creating inheritance of flieds or triggers from
>one table to another.
>Thanks.----------
>---------------------------
>Martin D. Berezaga
>mdberezaga@...
>Porto Alegre - RS - Brasil
>---------------------------
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.514 / Virus Database: 312 - Release Date: 28/08/2003
[Non-text portions of this message have been removed]