Dear all,
If I want to creat i super type entity and 2 subtypes enities (overlap).
How can I implement that in sql??
Thanks :)
Printable View
Dear all,
If I want to creat i super type entity and 2 subtypes enities (overlap).
How can I implement that in sql??
Thanks :)
Please
I need your help guys
Where are you?!
Supertypes and subtypes are logical design concepts, you need to transform them into tables to implement.
You have two choices.
1. Create the super type entity as a table with a subtype column and create a table for each sub type, in each sub type table add a foreign key pointing to super type table.
Disadvantage of this is, you need to join two tables to get complete information.
2. You can collapse the super type and subtypes into one table. You may end up with many nulls in columns that are not relevant to the current record.
thanxk you very much
you really help me :)
I'm very curious: what is the requirement you are attempting to support with this arrangement?
Thanks!
Bill
I'm creating a system for a small library,
The library has mebers, they can be readers or borrowers :)
"Library" and "Publications" database models abound (the "Pubs" database, for example, ships with MSSQL Server). Have you looked over the schemas of some of these to get ideas / confirm understanding / test your own conclusions?
If not, you may be missing a great opportunity.
Just my 2 cents ...
Bill