You are on page 1of 14

School Management

System
BIRMINGHAM CITY UNIVERSITYFACULTY OF COMPUTING ENGINEERING
AND THE BUILT ENVIRONMENT | Birmingham City University

Shereen Fouad 10/27/19 Advanced Databases

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.

2.1. Business Situation:


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.

2.2. Business Rules:


 Department employees many Staff, but each Staff is employed by a single department.
 Department contains many courses, each course is in a single department.
 The teachers that are the head of the departments must report to the headmaster.
 The accountant takes record of all financial data and reports it to the headmaster.
 A teacher teaches many courses and courses can be taught by many teachers.
 A course can be in many classrooms and each classroom can have many courses.
 A teacher can teach many students but students can be taught by one teacher.
 Each student has many courses to attend and each course has many students
attending.
 There are some students whom are not required to attend some of the subjects.
 One teacher is the head of the department.
 The system must keep track of the student grades.

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

o Attributes: working hours, grades

2.4. Simple Relationships:


[DEPARTMENT] 1 <employees> M [STAFF]
[DEPARTMENT] 1 <contains> M [COURSES]
[TEACHER] 1 <manages> 1 [DEPARTMENT]
[DEPARTMENT] M <reports> 1 [HEADMASTER]
[ACCOUNTANT] M <reports> 1 [HEADMASTER]
[TEACHER] M <teach> M [COURSES]
[CLASSROOMS] M < contains> M [COURSES]
[TEACHER] 1 <teaches> M [STUDENTS]
[STUDENTS] M <addend> M [COURSES]

2.5. Connectivities, Cardinalities and Participation:


A DEPARTMENT employs a minimum of __1__ STAFF
A DEPARTMENT employs a maximum of __M__ STAFFs
Reverse:
A STAFF is employed by a minimum of __1__ DEPARTMENT
A STAFF is employed by a maximum of __1__ DEPARTMENT

A TEACHER will manage a minimum of __1__ DEPARTMENT


A TEACHER will manage a maximum of __1__ DEPARTMENT
Reverse:

4|Page
A DEPARTMENT will be managed by a minimum of __1__ TEACHER
A DEPARTMENT will be managed by a maximum of __1__ TEACHER

A DEPARTMENT will report to a minimum of __1__ HEADMASTER


A DEPARTMENT will report to a maximum of __1__ HEADMASTER
Reverse:
A HEADMASTER will be reported by a minimum of __1__ DEPARTMENT
A HEADMASTER will be reported by a maximum of __M__ DEPARTMENTs

An ACCOUNTANT will report to a minimum of __1__ HEADMASTER


An ACCOUNTANT will report to a maximum of __1__ HEADMASTER
Reverse:
A HEADMASTER will be reported by a minimum of __1__ ACCOUNTANT
A HEADMASTER will be reported by a maximum of __M__ ACCOUNTANT

A TEACHER will teach a minimum of __1__ STUDENTS


A TEACHER will teach a maximum of __M__ STUDENTS
Reverse:
A STUDENTS will be taught by a minimum of __1__ TEACHER
A STUDENTS will be taught by a maximum of __1__ TEACHER

A STUDENTS will attend a minimum of __1__ COURSE


A STUDENTS will attend a maximum of __M__ COURSE
Reverse:
A COURSE will be attended by a minimum of __1__ STUDENTS
A COURSE will be attended by a maximum of __M__ STUDENTS

A TEACHER will provide a minimum of __1__ COURSE


A TEACHER will provide a maximum of __M__ COURSE
Reverse:
A COURSE will be provided by a minimum of __1__ TEACHER
A COURSE will be provided by a maximum of __M__ TEACHER

A CLASSROOM will hold a minimum of __1__ COURSE


A CLASSROOM will hold a maximum of __M__ COURSE
Reverse:
A COURSE will be held in a minimum of __1__ CLASSROOM

5|Page
A COURSE will be held in a maximum of __M__ CLASSROOM

2.6. ERD Mapping:

2.6.1. Mapping 1: 1 Relationships:

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 1 Contains M COURSES

Department Courses

DepID Name Location Budget CID Name DeptID Location


(£) 1 Chemistry 2 South
1 Maths North 142365 2 Writing 3 East
2 Science South 154326 3 Biology 2 South
3 English East 193524 4 Advance 1 North
Maths
5 Literature 3 East
6 Maths 1 North
7 Ratio and 1 North
Proportion

DEPARTMENT 1 Employees M STAFF

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 1 Teaches M STUDNETS

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

SID SID Fname Lname Title DOB Salary

15 14 Lauren Ralph Accountant 09/11/84 60000

16 14 Sean Mendez Accountant 14/02/89 58000

HEADMASTER 1 Reported
M
DEPARTMENT

Headmaster DEPARTMENT
SID Fname Lname Title DOB Salary
(£)
14 Cain Wright Headmaster 17/10/80 156051

DepID SID Name Location Budget (£)


1 14 Maths North 142365
2 14 Science South 154326
3 14 English East 193524

8|Page
2.6.3. Mapping N: M Relationships:

STUDENT
M M
Takes COURSES

1 M M
STUDENT Grades 1 COURSES

Student Courses

StudID Fname Lname Subject DOB CID Name Location


Name 1 Chemistry South
1 Mike Tom Chemistry 12/05/97 2 Writing East
2 Harry Dave Advance 22/09/98 3 Biology South
Maths 4 Advance North
3 Larry High Biology 06/12/97 Maths
5 Literature East
4 Dike Hike Maths 31/03/97
6 Maths North
5 Sam Bob Writing 15/01/98 7 Ratio and North
6 Daile Mike Ratio and 26/02/98 Proportion
Proportion
7 Rob Parkins Writing 14/02/97 Grades
8 Freddie Kroger Literature 24/07/98
StudID CID Grades
9 Sam Ham Chemistry 31/03/97
1 1 B
10 Lake Wake Chemistry 12/03/98
2 4 A
3 3 B
4 6 B
5 2 C
6 7 A
7 2 A
8 5 C
9 1 C
10 1 A

9|Page
COURSES
M M
TakesPlace CLASSROOMS

1
COURSES M
TakesPlace M1
CLASSROOMS

Classrooms Courses

CrID Name Location CID Name Location


1 CL1 South 1 Chemistry South
2 Writing East
2 CL2 North 3 Biology South
3 CL3 South 4 Advance North
4 CL4 North Maths
5 Literature East
5 CL5 East 6 Maths North
6 CL6 North 7 Ratio and North
7 CL7 East Proportion

8 CL8 North TakesPlace


9 CL9 South
10 CL10 North CrID CID Takesplace
1 1 South
2 4 North
3 3 South
4 6 North
5 2 East
6 7 North
7 2 East
8 6 North
9 1 South
10 7 North

10 | P a g e
STUDENT
M M
Addends CLASSROOMS

1 M M
STUDENT GoesTo 1 CLASSROOMS

Student Classroom

StudID Fname Lname Subject DOB CrID Name Location


Name 1 CL1 South
1 Mike Tom Chemistry 12/05/97
2 CL2 North
2 Harry Dave Advance 22/09/98
Maths 3 CL3 South
3 Larry High Biology 06/12/97 4 CL4 North
4 Dike Hike Maths 31/03/97 5 CL5 East
5 Sam Bob Writing 15/01/98 6 CL6 North
6 Daile Mike Ratio and 26/02/98 7 CL7 East
Proportion
8 CL8 North
7 Rob Parkins Writing 14/02/97
9 CL9 South
8 Freddie Kroger Literature 24/07/98
10 CL10 North
9 Sam Ham Chemistry 31/03/97
10 Lake Wake Chemistry 12/03/98
GoesTO
StudID CrID GoesTO
1 1 South
2 4 North
3 3 South
4 6 North
5 2 North
6 7 East
7 2 North
8 5 East
9 4 North
10 1 South

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:

SID Fname Lname Title DOB Salary (£)

4.4. Teachers:

SID Fname Lname Title DOB Salary (£)

4.5. Accountants:

SID Fname Lname Title DOB Salary (£)

4.6. Headmaster:

SID Fname Lname Title DOB Salary (£)

4.7. Students:
StudID Fname Lname Subject DOB
Name

4.8. Classrooms:
CrID Name Location

14 | P a g e

You might also like