Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

dynamic database design?

im given a hard copy of a form that is used by a hospital to gather information about its patients ! the form is divided into sections and each section has A LOT of YES/NO check boxes.

For example, one of the section is the History section that has more than 20 unrelated yes/no fields:

smoker ( yes or no)

diabetes (yes or no )

Chronic Lung (yes or no ) . . . . .

Another section is the "stress test data" section that has questions like the following:

Standard test (yes/no) , if yes , what are the results ( negative or positive), if positive ( what is the extent (low or high, or intermediate )

...

i am asked to design a database, show the relation tables and the relation between them ! :S:S this is looks NOTHING like the "student-class database" or the "CD company database" i came across ! this is just..i dont know..DYNAMIC :s:s

i have NO IDEA how to even START designing this database or what are the things that i should read or look into or practice in order to design a database for such a data!

PLEASE HELP !!

like image 311
PeacefulSoul Avatar asked Jan 21 '23 23:01

PeacefulSoul


2 Answers

Take a look at these two SO examples:

  • Example 1
  • Example 2
like image 110
Damir Sudarevic Avatar answered Jan 23 '23 13:01

Damir Sudarevic


Take a look at the EAV (Entity Attribute Value) Database Design scheme.

You don't have to use it exclusively, just for your dynamic data. Will it make that part of your queries interesting? Yes. But buys an incredible amount of flexibility. Btw, i've used the EAV scheme for several EHR/EMR projects succesfully.

like image 44
Paul Sasik Avatar answered Jan 23 '23 13:01

Paul Sasik