Questions tagged [inheritance]

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

18 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2 votes
0 answers

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 ...
Jesse's user avatar
  • 121
2 votes
0 answers

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 ...
soliz's user avatar
  • 293
2 votes
0 answers

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 ...
Gonzalo Vasquez's user avatar
1 vote
2 answers

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 ...
User1974's user avatar
  • 1,457
1 vote
0 answers

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/...
ahron's user avatar
  • 803
1 vote
1 answer

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 ...
Malik A. Rumi's user avatar
1 vote
0 answers

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 ...
Justin Wong's user avatar
1 vote
0 answers

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 ...
abalter's user avatar
  • 127
0 votes
0 answers

Postgresql Inheritance : Parent can be in two Child and c

In postgres sql inheritance: Parent: Person Child : Professor Child : Student Student can be a Professor How to manage insert with solo parent ?
KstorTroy's user avatar
0 votes
1 answer

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 ...
TimesAndPlaces's user avatar
0 votes
0 answers

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 ...
ike5's user avatar
  • 109
0 votes
1 answer

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 ...
Marion's user avatar
  • 1
0 votes
0 answers

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 ...
wavrik's user avatar
  • 101
0 votes
0 answers

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'...
Levi H's user avatar
  • 111
0 votes
1 answer

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 ...
Roberto Dominguez Cazarin's user avatar
0 votes
1 answer

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 ...
Johan's user avatar
  • 613
0 votes
0 answers

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 (~...
guettli's user avatar
  • 1,521
0 votes
1 answer

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 ...
user28560's user avatar