Identify the PK in given tables

alex

Tables are:

Patient(PatientID, FirstName, LastName)
Disease(DiseaseID, DiseaseName)
PatientDisease(PatientID, DateID, DiseaseID)

It's clear that Patient and Disease tables have PatientID and DiseaseID as PKs, but what about PatientDisease table knowing that each patient in a single day can be diagnosed with a single disease?

Solorad

I think, that it here you should use composite PK with all 3 fields: PatientId, DateId, DiseaseId. No matter one disease per day can be diagnosed or not, all 3 fields are mandatory for patient disease.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Joining Two Tables without PK

From Dev

Searching for a PK or FK within all database tables

From Dev

Using reflection to identify properties with a given decorator

From Dev

GitHub API: Identify the branches that contain a given commit

From Dev

Identify consecutive sequences based on a given variable

From Dev

A regex to identify spans with given class names

From Dev

Identify cell containing given text in LibreOffice Calc

From Dev

How to uniquely identify a given clojure function?

From Dev

Given a sequence of numbers how to identify the missing numbers

From Dev

Maven: Identify the correct dependency from given code

From Dev

Extract / Identify Tables from PDF python

From Dev

How to identify a column with name exist in all tables?

From Dev

Identify, and compare, two rows in two different tables

From Dev

Can External Tables in Hive Intelligently Identify Partitions?

From Dev

How to identify tables in text file using php

From Dev

Quickly identify multiple tables in csv-files?

From Dev

Identify the missing combinations by comparing two tables

From Dev

Identifying tables from a given database

From Dev

merge two tables by a given rule

From Dev

Given a set of PK in a Java Set, how to select all rows with PK in the set

From Dev

Foreign keys from 2 tables make a PK in the 3rd

From Dev

How does the lexical analyzer identify whether given token is Identifier or Keyword?

From Dev

Is there an algorithm to identify the most salient word from a given set of words?

From Dev

Using SharpCompress to identify the volumes associated with a given RAR archive

From Dev

Apache POI : API to identify tables in the excel sheet and read them

From Dev

How to identify identical columns with different names across tables?

From Dev

Querying BigQuery tables in a given date range

From Dev

Collecting comma "," separated data from given tables

From Dev

List all tables of a given user in Oracle

Related Related

  1. 1

    Joining Two Tables without PK

  2. 2

    Searching for a PK or FK within all database tables

  3. 3

    Using reflection to identify properties with a given decorator

  4. 4

    GitHub API: Identify the branches that contain a given commit

  5. 5

    Identify consecutive sequences based on a given variable

  6. 6

    A regex to identify spans with given class names

  7. 7

    Identify cell containing given text in LibreOffice Calc

  8. 8

    How to uniquely identify a given clojure function?

  9. 9

    Given a sequence of numbers how to identify the missing numbers

  10. 10

    Maven: Identify the correct dependency from given code

  11. 11

    Extract / Identify Tables from PDF python

  12. 12

    How to identify a column with name exist in all tables?

  13. 13

    Identify, and compare, two rows in two different tables

  14. 14

    Can External Tables in Hive Intelligently Identify Partitions?

  15. 15

    How to identify tables in text file using php

  16. 16

    Quickly identify multiple tables in csv-files?

  17. 17

    Identify the missing combinations by comparing two tables

  18. 18

    Identifying tables from a given database

  19. 19

    merge two tables by a given rule

  20. 20

    Given a set of PK in a Java Set, how to select all rows with PK in the set

  21. 21

    Foreign keys from 2 tables make a PK in the 3rd

  22. 22

    How does the lexical analyzer identify whether given token is Identifier or Keyword?

  23. 23

    Is there an algorithm to identify the most salient word from a given set of words?

  24. 24

    Using SharpCompress to identify the volumes associated with a given RAR archive

  25. 25

    Apache POI : API to identify tables in the excel sheet and read them

  26. 26

    How to identify identical columns with different names across tables?

  27. 27

    Querying BigQuery tables in a given date range

  28. 28

    Collecting comma "," separated data from given tables

  29. 29

    List all tables of a given user in Oracle

HotTag

Archive