Inheritance — Joined Strategy — Concept Check
Questions on Inheritance — Joined Strategy. Base class gets its own table; subclass tables hold only their columns, joined by PK; good normalisation but requires a JOIN per subclass level on every query.
Questions in this quiz
8 questions on Inheritance — Joined Strategy — Concept Check. Work through them here, then start the quiz to answer them and see your score.
1.In a system using JOINED inheritance strategy, a query to retrieve all vehicles is running slower than expected. What could be a contributing factor?
- AUse of LEFT OUTER JOIN instead of INNER JOIN
- BExcessive data in the base table
- CMultiple JOIN operations due to subclass levels
- DLack of indexing on primary keys
2.A developer notices that adding a new subclass in a JOINED inheritance strategy requires schema changes. What is the likely reason?
- AA new discriminator column must be added
- BEach subclass has its own table with unique columns
- CAll subclass columns are stored in the base table
- DThe base class table needs to be altered
3.When using JOINED inheritance, what happens if a subclass table's primary key is not a foreign key to the base table?
- ASchema changes will be unnecessary
- BQueries will run faster
- CData integrity issues may arise
- DThe subclass table will not be created
4.A query on a 3-level hierarchy in JOINED inheritance is taking too long. What is a potential solution?
- AUse a single table for all classes
- BRemove the discriminator column
- CSimplify the hierarchy to reduce JOINs
- DAdd more columns to the base table
5.In a JOINED inheritance strategy, what is the role of the discriminator column?
- AHelps in debugging by identifying subclass types
- BEnsures data integrity across tables
- CStores all subclass-specific data
- DReduces the number of JOIN operations
6.A developer assumes that in JOINED inheritance, all subclass columns are stored in the base table. What is the flaw in this assumption?
- AAll subclass columns must be nullable
- BNo need for separate subclass tables
- CBase table holds all subclass data
- DSubclass tables store their own columns
7.What is a potential drawback of using JOINED inheritance strategy in a complex hierarchy?
- AData redundancy across tables
- BIncreased query complexity due to multiple JOINs
- CInability to enforce NOT NULL constraints
- DLack of schema normalization
8.In a JOINED inheritance setup, why might schema changes be localized to specific tables?
- AEach subclass has its own table, so changes affect only relevant tables
- BSchema changes propagate across all tables
- CAll data is centralized in the base table
- DDiscriminator column handles all schema changes