Question

well I've posted this question originally on StackExchange for database adminsitrators: https://dba.stackexchange.com/questions/28356/should-this-be-an-identifying-relationship-or-not

But it seems to lack users I guess. So can anyone help me with this?

Edit: Alright, I chose to have a non-identifying relationship, this way the User can be Patient, SpiProfessional or both. Seems to work better, even though it's more work when writing queries. Thanks for everybody's answers, they all contributed to my understanding of databases.

Was it helpful?

Solution 2

OK, here is what I think based on your design. The User table and Patient table, it shouldn't be 1 to 1 relationship, as the user may not be a patient, so it should be 1 to 0..1 relationship.

The same goes with SpiProessional. The user may not be a SpiProfessioanl, so the User table to Spiprofessional, should be 1 to 0..1 relationship.

I think it's worth to have a look at these two post. 1. Any example of a necessary nullable foreign key? 2. Implementing one-to-zero-or-one relation in SQL Server

OTHER TIPS

Need to know more information in order to answer your question.

  1. Can a user be Patient?
  2. Can a user be a SpiProfessional?
  3. Can a user be a Patient and a SpiProfessioanl?
  4. What additional data/attributes need to be stored for the patient?
  5. What additional data/attributes need to be stored for the SpiProfessional?
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top