Questions tagged [inheritance]
For questions about extending a base object's features into a derived object.
19
questions with no upvoted or accepted answers
2
votes
1
answer
670
views
Postgres natively partitioned tables - adding extra child columns
With Postgres native partitioning, can you add extra columns to a partition of the base table? Like:
CREATE TABLE item (
tenant_id bigint NOT NULL,
item_id bigint NOT NULL,
kind text NOT ...
2
votes
0
answers
183
views
Is it possible to drop inheritance from the parent table (top down)?
Our system uses inheritance on two levels:
master
child_level_1
child_level_2
child_level_2
child_level_2
child_level_1
child_level_2
child_level_2
child_level_1
child_level_2
The idea was to ...
2
votes
0
answers
691
views
Is it correct to model a specialized table using a foreign key whose referencing attributes are not also forming its primary key?
In the process of designing a database model, I would like to implement a Class Table Inheritance pattern in a way that does not seem common at first. I would like to know if it is a correct ...
2
votes
0
answers
240
views
PostgreSQL database re-design considerations
We have a 2TB PostgreSQL database, which contains two groups of tables that account for about 90% of the storage used. These two groups can be loosely described as 2 big tables partitioned, the first ...
1
vote
2
answers
287
views
Oracle MV requires object type to be defined as FINAL?
I want to create an Oracle 18c materialized view (MV) on a table that has a user-defined datatype called ST_GEOMETRY:
The MV would do a COMPLETE refresh on a schedule — on a local table.
Some info ...
1
vote
0
answers
805
views
Implementing a graph-like design on postgresql using CTEs and inheritance
This question is about attempting to model/design an elementary graph-like database within postgres.
The starting point is that graphs have:
Nodes
Nodes have properties
Node are connected by (bi/...
1
vote
1
answer
597
views
Django Multi Table Inheritance and Preserving Child and Child History
Place can have many different one to one fields, that’s why it can have bookstore, restaurant, and hardware store. But can the same place be both a bookstore and a restaurant at the same time? Now if ...
1
vote
0
answers
1k
views
PostgreSQL doesn't use index on inherited tables
I have two tables in PostgreSQL 9.4.5 deployed on Amazon RDS:
an append only, weekly partitioned, All Positions table. These store all position readings from about 100,000 sensors. There are about 50 ...
1
vote
0
answers
279
views
Alter schema of Access 2013 database with linked table
I'm trying to change the schema of an Access 2013 table. I want to lengthen some of the text fields. When I change the schema and try to save I get dialog with Operation is not supported for this type ...
0
votes
1
answer
48
views
Make all users within group role inherit permissions
I have a group role that consists of around 1,000 users. Those users do not inherit group role permissions, and I would like to make them all inherit them instead.
What would be the way to do it ...
0
votes
0
answers
483
views
How to implement concrete table inheritance pattern in MySQL?
I want to know how to implement classes in MySQL that represent a subset of another class type, with the purpose of having subclasses inherit fields from the parent class. Described by Martin Fowler ...
0
votes
1
answer
229
views
When using class inheritance, can all PKs of the derived tables exist as PKs of the base table?
Brief questions
When class inheritance is used, the child table inherits the key from the parent, right? Thus, you INSERT INTO the parent and then the child?
This indicates that the PK of the child ...
0
votes
0
answers
53
views
Poor performance in a SELECT using Inheritance
I will detail my problem in good detail. I have a marketplace application so I make a decision to make a multitenant per schema approach. I like this approach because of the isolation of data, but I'm ...
0
votes
0
answers
45
views
I have multiple different objects which share most attributes, but vary on a few, what methods could I use to model them?
I have a few different items which mostly share the same attributes, but then have a few extra/less. In OOP they could be modeled well with inheritance, but postgres' inheritance is limiting and doesn'...
0
votes
1
answer
107
views
Pass information to another table with the same inherit
Suppose the following scenario ... I have two tables (A, B) that inherit from a Z table, the SGBD is postgresql, these tables do not have an additional column, my question is how to pass a row from ...
0
votes
1
answer
4k
views
Inheritance and foreign keys in Postgres
This is about using inheritance and foreign keys in Postgresql databases.
Consider the following simplistic example whose structure is based on what I am building at the moment (but the specifics were ...
0
votes
1
answer
283
views
Can Postgres inherited tables overlap
Is it possible to have single row in a parent table be visible in more than one inherited (child) table?
Perhaps by inserting a row directly into the master table and then "making it visible" in one ...
0
votes
0
answers
734
views
PostgreSQL and Single Table Inheritance
I read about STI (Single Table Inheritance) and like the idea.
Does PostgreSQL handle 95% NULL values in some columns if I have about 1M rows well?
Does it impact performance if there many columns (~...
0
votes
1
answer
74
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 ...