How do we implement an IS-A Relationship?

I did as Donnie suggested, but without the role field, because it complicates things. This is the final implementation: DDL: CREATE TABLE Employee ( ast VARCHAR(20) not null, firstname VARCHAR(200) not null, surname VARCHAR(200) not null, … PRIMARY KEY(ast) ); CREATE TABLE Administrative ( employee_ast VARCHAR(20) not null REFERENCES Employee(ast), PRIMARY KEY(employee_ast) ); CREATE TABLE … Read more

How to do Inheritance Modeling in Relational Databases?

Martin Fowler discusses this extensively in his book Patterns of Enterprise Application Architecture book. Get this book and look into: Single Table Inheritance Class Table Inheritance Concrete Table Inheritance The Website should give you some idea. You might also want to read the section on inheritance mappers. Each of the different approaches have their pros … Read more

How can you represent inheritance in a database?

@Bill Karwin describes three inheritance models in his SQL Antipatterns book, when proposing solutions to the SQL Entity-Attribute-Value antipattern. This is a brief overview: Single Table Inheritance (aka Table Per Hierarchy Inheritance): Using a single table as in your first option is probably the simplest design. As you mentioned, many attributes that are subtype-specific will … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)