35 reputation
4
bio website
location
age
visits member for 3 years, 1 month
seen Jan 2 '12 at 6:06

Dec
17
comment Generalisation in databases
@garik is it not wrong/bad design for a key to be both primary and foreign key??
Dec
16
comment Generalisation in databases
no, i know how to create a primary key - foreign key relation in db2. its same as mysql(almost). i don't know how to create the one-to-one relationship between one parent and multiple child tables. should we just use the same primary key-foreign key relationship?? can you pls help in mysql if possible.
Dec
16
accepted Generalisation in databases
Dec
15
comment Generalisation in databases
@garik one more thing... any idea how to implement this relationship in db2 (or atleast in sql) (can we just use an ordinary foreign key relationship) ??
Dec
15
comment Generalisation in databases
@garik THANKS A LOT :)
Dec
15
comment Generalisation in databases
@garik in the diagram, in the staff to doctor and staff to nurse connections, there seems to be two primary keys on both sides of the relationship and no foreign key. how do we connect these?
Dec
15
awarded  Supporter
Dec
15
comment Generalisation in databases
@garik thanks a lot for the illustration...
Dec
15
awarded  Commentator
Dec
15
comment Generalisation in databases
this is a college project work ... you're right i d'ont have much experience designing databases, but at least you could help ...
Dec
14
comment Generalisation in databases
oh... so is it much better to predefine all the required staff when creating the schema itself?
Dec
14
comment Generalisation in databases
kk..i know that... i was just asking if there is another way ...
Dec
13
comment Generalisation in databases
One more doubt... Suppose the hospital is big.. how do we add new types of staff (who have different permissions) if we create a table for each specialization every time (doctor, nurse,etc) (sorry for the repetition below)
Dec
13
comment Generalisation in databases
but suppose the hospital is big.. how do we add new types of staff (who have different permissions) if we create a table for each specialization (doctor, nurse,etc) ...
Dec
13
comment Generalisation in databases
no.. this is not homework.. this is a project (as stated above). i think you got the question.. exactly what i was thinking of. however, in that case, is it better to keep a common id for all staff for generality or should we have separate ids for doctor table, nurse table, etc e.g because a diagnosis can only be done by a doctor (doctor id can be used in the diagnosis table and not staff id).
Dec
13
accepted Single versus Multiple databases
Dec
13
awarded  Scholar
Dec
13
asked Generalisation in databases
Dec
13
comment Single versus Multiple databases
What if it were just a project... which one would be better??
Dec
9
comment Single versus Multiple databases
yes... we have to include pureXML