Open firebird-automations opened 18 years ago
Commented by: Cosmin Apreutesei (cosmin_ap2)
I vote for it, just don't do it like Postgres, it's useless without applying constraints on the parent. If done right, this would be a killer feature for firebird.
Commented by: Laszlo Moravecz (eMeL) (emel)
+1
I would like to see it early as soon possible ;)
See how Alex Peshkov plan it: http://www.firebirdnews.org/?p=3830
I think, inherited table must be a view+table hibrid. [A view hide same named table] When select inherited table it shown as an updateable view (auto collect base+inherited table's data). When update this table+view combo it updates both (or more) physical table, with triggers too.
Commented by: Marcoci Dorin (marcodor)
+1 This is a very important and long awaited feature. Please include it in todo list for v3. Ideal for model to store natural objects. We have for example ORGANISMS->ANIMALS->QUADRUPEDS->DOGS->ROTTWEILERS. Every "object" have they own properties and triggers ;) We use such approach in our accounting software, using views and triggers, but it is a lot of work to code and manage, want it automatically. OOP is a great idea.
Submitted by: Dejan Schild (schild)
Votes: 17
It would be very useful to implement this feature, like in PosgreSQL. Example: CREATE TABLE cities ( name char(20), population integer, altitude integer );
CREATE TABLE capitals ( state char(2) ) INHERITS (cities);
In this case, the capitals table inherits all the columns of its parent table, cities. State capitals also have an extra column, state, that shows their state.
More on: http://www.postgresql.org/docs/8.1/interactive/ddl-inherit.html