L
L
link002015-07-09 20:34:12
Database
link00, 2015-07-09 20:34:12

Are there built-in DBMS tools to work effectively with table inheritance?

I welcome everyone. I read Fowler, in parallel I came across a forum for discussion, and also became interested. Fowler describes "object-relational" generic solutions.
There are 5 options for storing data in RDBs that are "strongly object-oriented" (for example, in the Tool Catalog, or auto-parts)
1. Single Table Inheritance (one table, all attributes of ALL types in it)
2. Concrete Table Inheritance ( table FOR EACH type of object, in each table COMMON attributes of ALL types are duplicated)
3. Class Table Inheritance (this is OOP-style inheritance. Tables resemble OOP classes. Common fields are allocated to a BASIC table.)
4. EAV (Entity-Attribute-Value )
5. NoSQL (XML, JSON, SerializedLOB)
--
Each of these options has the right to life. Everything will depend on a LARGE number of nuances. (3,4 are essentially "crutches")
My question is about pattern 3. At EACH level of the inheritance hierarchy, you need to do a subquery (because often we do not know which TYPE / TYPES the object stored in the BASE table belongs to) in order to find out with which table(s) you need to join. Accordingly, the question is: are there any means in the DBMS ITSELF (of interest to MySQL, but also interesting about others), so that you can work with this pattern more Efficiently and Gracefully?
(And the same question only for the 4 EAV pattern. There we also (as B. Karvin writes) essentially have a "system within a system".)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question