Re: [GENERAL] Best practice on inherited tables

2013-05-19 Thread Chris Travers
On Sun, May 19, 2013 at 4:44 AM, Julian wrote: > On 19/05/13 13:02, Chris Travers wrote: > > > > I actually think that bringing some object-oriented principles into > > database design can result in some very useful things, provided that one > > remembers that applications are modelling behavior

Re: [GENERAL] Best practice on inherited tables

2013-05-19 Thread Julian
On 19/05/13 13:02, Chris Travers wrote: > > I actually think that bringing some object-oriented principles into > database design can result in some very useful things, provided that one > remembers that applications are modelling behavior while databases are > modelling information (and so the tw

Re: [GENERAL] Best practice on inherited tables

2013-05-19 Thread Frank Lanitz
Am 17.05.2013 21:21, schrieb Alfonso Afonso: > Hi Frank > > Although you are thinking in OOP, the SQL is itself one definition > model that you should not ignore and, IMHO, try to follow the > normalization statements. > > You can build a robust and normalized schema (table primarylocation , > ta

Re: [GENERAL] Best practice on inherited tables

2013-05-18 Thread Chris Travers
In general, I find table inheritance most helpful when one wants to re-use interfaces over multiple independent tables. For example instead of a global notes table, a bunch of notes tables attached to things, but with centralized schema management. In general in these cases you want something ide

Re: [GENERAL] Best practice on inherited tables

2013-05-18 Thread Julian
On 17/05/13 22:46, Frank Lanitz wrote: > Hi folkes, > > I'm looking for a nice way to build this scenario: > I've got a lot of locations with some special types. For example I've > got workplaces, places like real laboratories and virtual places like > maybe parcel service. For each of the differe

Re: [GENERAL] Best practice on inherited tables

2013-05-17 Thread Alfonso Afonso
Hi Frank Although you are thinking in OOP, the SQL is itself one definition model that you should not ignore and, IMHO, try to follow the normalization statements. You can build a robust and normalized schema (table primarylocation , table secondlocation that have a idprimarylocation, etc.) and

Re: [GENERAL] Best practice on inherited tables

2013-05-17 Thread Chris Travers
Just our experience in LedgerSMB On Fri, May 17, 2013 at 5:46 AM, Frank Lanitz wrote: > Hi folkes, > > I'm looking for a nice way to build this scenario: > I've got a lot of locations with some special types. For example I've > got workplaces, places like real laboratories and virtual places

[GENERAL] Best practice on inherited tables

2013-05-17 Thread Frank Lanitz
Hi folkes, I'm looking for a nice way to build this scenario: I've got a lot of locations with some special types. For example I've got workplaces, places like real laboratories and virtual places like maybe parcel service. For each of the different types I need to store some common attributes as