Professional Documents
Culture Documents
System
BIRMINGHAM CITY UNIVERSITYFACULTY OF COMPUTING ENGINEERING
AND THE BUILT ENVIRONMENT | Birmingham City University
1|Page
Table of Contents
1. Domain Deception: ........................................................................................................ 3
2. Database Analysis: ........................................................................................................ 3
2.1. Business Situation: ................................................................................................. 3
2.2. Business Rules: ...................................................................................................... 3
2.3. List of Entity/Attributes: ........................................................................................... 4
2.4. Simple Relationships: ............................................................................................. 4
2.5. Connectivities, Cardinalities and Participation: ........................................................ 4
2.6. ERD: ........................................................................ Error! Bookmark not defined.
2.7. ERD Mapping: ........................................................................................................ 6
2.7.1. Mapping 1: 1 Relationships: ............................................................................. 6
2.7.2. Mapping 1: M Relationships: ............................................................................ 6
2.7.3. Mapping N: M Relationships: ........................................................................... 9
3. Database Design: ........................................................................................................ 13
4. Database Normalisation: .............................................................................................. 14
5. Database Implementation: .............................................. Error! Bookmark not defined.
6. Conclusions: ................................................................... Error! Bookmark not defined.
7. References: .................................................................... Error! Bookmark not defined.
2|Page
1. Domain Deception:
2. Database Analysis:
There is a school that manages the lives of staff and academic students, which school is big
and has a database which manages the school day to day operations. In this school there are
different departments (DeptID, Name, Location, budget) provide courses (CID, Course Name,
DeptID, location) each of these departments must have Staff (SID, Fname, Lname, Salary,
Title, and DOB) such as Teachers (SID, Fname, Lname, Title and DOB) Accountants (SID,
Fname, Lname, Title and DOB), and the headmaster (SID, Fname, Lname and Title) and to
teach the subjects to the students (StudID, Fname, Lname, DOB, subject name) whom may
be taught by one teacher, which takes place in a classroom (CrID, Location, Number, capacity)
and at least one these teachers must be the head of the department to report the progression
to the headmaster and the accountant does the same, whom may adjust accordingly based
on department performance. Each student is required to attend all the subjects, but there are
some optional subjects, which students are not required to attend. The database must also
track the Grades of the students.
3|Page
2.3. List of Entity/Attributes:
Entity: DEPARTMENT:
o Attributes: DeptID, Name, Location, and budget.
Entity: Courses:
o Attributes: CID, Name, DeptID, Location
Entity: SAFF:
o Attributes: SID, Fname, Lname, Salary, Title, and DOB
Entity: TEACHERS:
o Attributes: SID, Fname, Lname, Salary, Title, and DOB
Entity: ACCOUNTANT:
o Attributes: SID, Fname, Lname, Salary, Title, and DOB
Entity: HEADMASTER:
o Attributes: SID, Fname, Lname, Salary, Title, and DOB
Entity: STUDENT:
o StudID, Fname, Lname, DOB, subject name
Entity: CLASSROOM:
o Attributes: CrID, Location, Number
4|Page
A DEPARTMENT will be managed by a minimum of __1__ TEACHER
A DEPARTMENT will be managed by a maximum of __1__ TEACHER
5|Page
A COURSE will be held in a maximum of __M__ CLASSROOM
DEPARTMENT 1 1
Managed TEACHERS
Department Teachers
DepID SID Name Location Budget SID Fname Lname Title DOB Salary
(£) (£)
1 5 Maths North 142365 1 Mike Tom Maths 12/05/85 35000
teacher
2 2 Science South 154326
2 Harry Dave Science 22/09/70 40000
3 3 English East 193524 teacher
3 Larry High English 06/12/90 31425
teacher
4 Dike Hike Science 31/03/81 51431
teacher
5 Sam Bob Maths 15/01/79 25431
teacher
2.6.2. Mapping 1: M Relationships:
Department Courses
6|Page
Department STAFF
DepID Name Location Budget SID DepID Fname Lname Title DOB Salary
(£) (£)
1 Maths North 142365 1 1 Mike Tom Maths 12/05/85 35000
2 Science South 154326 teacher
3 English East 193524 2 2 Harry Dave Science 22/09/70 40000
teacher
3 3 Larry High English 06/12/90 31425
teacher
4 2 Dike Hike Science 31/03/81 51431
teacher
5 1 Sam Bob Maths 15/01/79 25431
teacher
6 2 Tyler Smith Chef 26/02/68 13000
7 1 Rose Hai Cleaner 14/02/75 13500
8 3 Patrick Lake Guard 24/07/88 17000
9 1 Acer Len Chef 31/03/86 13000
10 3 Gerry White Guard 12/03/88 17000
11 1 Jack Mann Guard 19/01/91 16500
12 2 Barry Edge Guard 29/08/82 18000
13 3 Harper Blade Cleaner 16/06/73 13500
14 1 Cain Wright Headmaster 17/10/80 156051
15 3 Lauren Ralph Accountant 09/11/84 60000
16 1 Sean Mendez Accountant 14/02/89 58000
Teachers Student
SID Fname Lname Title DOB Salary StudID SID Fname Lname Subject DOB
(£) Name
1 Mike Tom Maths 12/05/85 35000 1 4 Mike Tom Chemistry 12/05/97
teacher 2 1 Harry Dave Advance 22/09/98
2 Harry Dave Science 22/09/70 40000 Maths
teacher 3 2 Larry High Biology 06/12/97
3 Larry High English 06/12/90 31425
4 5 Dike Hike Maths 31/03/97
teacher
4 Dike Hike Science 31/03/81 51431 5 3 Sam Bob Writing 15/01/98
teacher 6 1 Daile Mike Ratio and 26/02/98
5 Sam Bob Maths 15/01/79 25431 Proportion
teacher 7 3 Rob Parkins Writing 14/02/97
8 3 Freddie Kroger Literature 24/07/98
9 2 Sam Ham Chemistry 31/03/97
10 4 Lake Wake Chemistry 12/03/98
7|Page
HEADMASTER 1 Reported
M
ACCOUNTANT
Headmaster Accountant
SID Fname Lname Title DOB Salary
(£)
14 Cain Wright Headmaster 17/10/80 156051
HEADMASTER 1 Reported
M
DEPARTMENT
Headmaster DEPARTMENT
SID Fname Lname Title DOB Salary
(£)
14 Cain Wright Headmaster 17/10/80 156051
8|Page
2.6.3. Mapping N: M Relationships:
STUDENT
M M
Takes COURSES
1 M M
STUDENT Grades 1 COURSES
Student Courses
9|Page
COURSES
M M
TakesPlace CLASSROOMS
1
COURSES M
TakesPlace M1
CLASSROOMS
Classrooms Courses
10 | P a g e
STUDENT
M M
Addends CLASSROOMS
1 M M
STUDENT GoesTo 1 CLASSROOMS
Student Classroom
11 | P a g e
TEACHER
M M
Covers CLASSROOMS
1 M M1
TEACHER CoversIn CLASSROOMS
Teacher Classroom
SID Fname Lname Title DOB Salary
CrID Name Location
(£)
1 Mike Tom Maths 12/05/85 35000 1 CL1 South
teacher 2 CL2 North
2 Harry Dave Science 22/09/70 40000
teacher 3 CL3 South
3 Larry High English 06/12/90 31425 4 CL4 North
teacher
5 CL5 East
4 Dike Hike Science 31/03/81 51431
teacher 6 CL6 North
5 Sam Bob Maths 15/01/79 25431 7 CL7 East
teacher
8 CL8 North
9 CL9 South
10 CL10 North
CoversIn
SID CrID GoesTO
1 1 South
2 4 North
3 3 South
4 6 North
5 2 North
4 7 East
3 2 North
1 5 East
2 4 North
5 1 South
12 | P a g e
3. Database Design:
13 | P a g e
4. Database Normalisation:
We are having troubles with normalisation could you give some advice.
4.1. Department:
DepID Name Location Budget
Name, location, budget depend on deptid, but name tells location of department and budget
and location tells you name and budget of department, could you advise us on to tackle this.
4.2. Courses:
CID Name Location
4.3. Staff:
4.4. Teachers:
4.5. Accountants:
4.6. Headmaster:
4.7. Students:
StudID Fname Lname Subject DOB
Name
4.8. Classrooms:
CrID Name Location
14 | P a g e