inheritance and data types
Posted in 1999
Topics: Data Types & Schema Design
- suppose you have a dynamical tree structure that requires each node to inherit the characteristics of its parents.... but you can also insert classes into the class hierarchy... family | | genus | | | specie | | subspecies the classes here can be easily created as data types which inherit directly from their parents... but the structure MUST allow to insert a class in between classes in the class hierarchy... i.e. inserting a sub-genus below a genus, that inherits from genus, this causes the species below to inherit from the sub-genus... It would mean a change in the data type's inheritance scheme and a change in the data stored in such tree structures in tables. can this be done with data types dinamically? I mean... my final user must have a non-sql interface that does this. ____roberto dircio palacios macedo__________________________________ __ | | /\\_\\__ | Interactive and | http://ict.udlap.mx/people/roberto \\/_/\\_\\ | Cooperative | tel:(22)292431 /\\_\\/_/ | Technologies Lab. | mail: roberto@mail.pue.udlap.mx \\/_/ ict | UDLA-P, Mexico. | __________|____________________|____________________________________
>>can this be done with data types dinamically? No. You can create a new table/type subgenus that inherits the attributes of genus. But, in order to have the specie and subspecies tables inherit from your new table, they must be unloaded,dropped, recreated, and reloaded. You cannot alter the structure of typed tables. Therefore, your only option is to drop and recreate. I have put "Altering of typed tables" in as a feature request but who knows... Eric Weaver, InteliHealth Roberto Dircio Palacios Macedo <roberto@mail.udlap.mx> wrote in message news:7fo1rq$8mn$1@news.xmission.com... > > > - suppose you have a dynamical tree structure that requires each node to > inherit the characteristics of its parents.... but you can also insert > classes into the class hierarchy... > > family > | > | > genus > | > | > | > specie > | > | > subspecies > > > the classes here can be easily created as data types which inherit > directly from their parents... > but the structure MUST allow to insert a class in between classes in the > class hierarchy... i.e. inserting a sub-genus below a genus, that inherits > from genus, this causes the species below to inherit from the sub-genus... > It would mean a change in the data type's inheritance scheme and a change > in the data stored in such tree structures in tables. > > > can this be done with data types dinamically? I mean... my final user > must have a non-sql interface that does this. > > > > ____roberto dircio palacios macedo__________________________________ > __ | | > /\\_\\__ | Interactive and | http://ict.udlap.mx/people/roberto > \\/_/\\_\\ | Cooperative | tel:(22)292431 > /\\_\\/_/ | Technologies Lab. | mail: roberto@mail.pue.udlap.mx > \\/_/ ict | UDLA-P, Mexico. | > __________|____________________|____________________________________ >