Questions tagged [inheritance]

For questions about extending a base object's features into a derived object.

Filter by
Sorted by
Tagged with
0
votes
1answer
470 views

Foreign key double inheritance SQLITE

I'm designing a domotic system database and I'm trying to figure out how to represent two foreign keys. This is the cardinality I want. Consider 1...N Areas (rooms, halls, kitchens, etc.): Area 1 - ...
3
votes
1answer
311 views

Is this a step in the right direction for normalization? SQL 'inheritance' and Many-to-Many relationships

Context: So, this is kind of a compound question, but they go together, and definitely wouldn't make sense split up into separate questions. I've been working on a new database for what will end up ...
1
vote
1answer
2k views

Cannot add or change records

I'm designing a database structure wherein I like to apply the concept of inheritance. There's a base tables and derived tables in which the relationship is one-to-one. I'm quite new as of how could ...
0
votes
1answer
70 views

Table join inheritance

I create db with Person, Client, Employee, Manager, Developer. I'm interested what is the best way to put the data in tables. In which cases should programmer unite Client in table hierarchy with ...
3
votes
1answer
3k views

Polymorphic Association - is it bad? [duplicate]

In the following schema: Collections Upvotes Reports Upvotes Reviews Upvotes I'm tempted to have a single Upvotes table with a single "entityId" column that stores either the CollectionId, ...
0
votes
1answer
313 views

Altering a parent table in Postgresql 8.4 breaks child table defaults

The problem: In Postgresql, if table temp_person_two inherits fromtemp_person, default column values on the child table are ignored if the parent table is altered. How to replicate: First, create ...
0
votes
1answer
68 views

Mapping and Inserting Values into a Specialized table

For a system i'm designing,i have one parent entity,Computer Computer(computer_id,computer_processor,computer_hddrive,computer_memory); A computer can be of two types,Desktop and Laptop,each having ...
0
votes
1answer
307 views

Partitioning table with billion row

I have a big table referenced by other tables and need to split the table on several parts. I create table by CREATE TABLE product_part0 () INHERITS (product); Move some rows to product_part0 by ...
2
votes
2answers
8k views

How to drop inheritance?

I am new to PostgreSQL. The situation I have is someone created a child table inherits from the parent table. And dropped the child table. But the parent table still has the "down arrow" sign on it. ...