Informal Design Guidelines: March 23, 2008 DB:EER Model - 1 1
Informal Design Guidelines: March 23, 2008 DB:EER Model - 1 1
At logical level
How users interpret relation schemas and the meaning of
attributes?
A Bottom-Up Method
We start by identifying all the attributes then trying to group
attributes based on some relationships, to build relations.
A Top-Down Method
We start by identifying all the grouping of attributes into relations
and then analyze these relation to further decompose them to
produce better relations.
EMPLOYEE DEPT_LOCATIONS
Ename SSN Bdate Address Dnumber Dnumber Dlocation
DEPARTMENT WORKS_ON
Dname Dnumber Dmgrssn SSN Pnumber Hours
PROJECT
Pname Pnumber Plocation Dnum
EMP_DEPT
Ename SSN Bdate Address Dnumber Dname DmgrSsn
EMP_PROJ
SSN Pnumber Hours Ename Pname LOcation
If any anomalies are present, note them clearly and make sure
that the programs that update the database will operate correctly.
Insert anomalies +
Delete anomalies +
Modification anomalies +
Redundant data
EMP_DEPARTMENT
Solution
EMP_DEPARTMENT
Ename SSN Ddate Address Dnumber Dname DMGRManager
Salah 111 1965-01-09 Khobar 5 Research 222
Wael 222 1955-12-08 Khobar 5 Research 222
Zaher 333 1968-07-19 Dammam 4 Administration 444
Walid 444 1941-06-20 Dhahran 4 Administration 444
Nasser 555 1962-09-15 Jubail 5 Research 222
Essam 666 1972-07-31 Khobar 5 Research 222
Jabber 777 1969-03-29 Khobar 4 Administration 444
Bader 888 1937-11-10 Khobar 1 Headquarters 888
Ali 999 1967-10-15 Dammam
6 Accounting 111
Solution
EMP_DEPARTMENT
Ename SSN Ddate Address Dnumber Dname DMGRManager
Salah 111 1965-01-09 Khobar 5 Research 222
Wael 222 1955-12-08 Khobar 5 Research 222
Zaher 333 1968-07-19 Dammam 4 Administration 444
Walid 444 1941-06-20 Dhahran 4 Administration 444
Nasser 555 1962-09-15 Jubail 5 Research 222
Essam 666 1972-07-31 Khobar 5 Research 222
Jabber 777 1969-03-29 Khobar 4 Administration 444
Bader 888 1937-11-10 Khobar 1 Headquarters 888
Deleting Borg. James will delete the only information of department 1 from the database
Solution
EMP_DEPARTMENT
Solution
Lecturers Subjects
Which Adel is the teacher of DB
Subjects