Database Design Development
Database Design Development
Pearson
Higher Nationals in
Computing
Unit 14: Database Design and Development
1|Page
Table of Contents
Figure 1 EER Diagram.....................................................................................................................4
Figure 2 Faculty Table.................................................................................................................... 4
Figure 3 Department Table............................................................................................................5
Figure 4 Staff table.........................................................................................................................5
Figure 5 staff type table................................................................................................................. 6
Figure 6 Student Table...................................................................................................................6
Figure 7 student type table............................................................................................................6
Figure 8 Course Table.................................................................................................................... 7
Figure 9 Subject Table....................................................................................................................7
Figure 10 Marks Table................................................................................................................... 8
Figure 11 Forward Engineering step 1...........................................................................................9
Figure 12 Forward Engineering step 2........................................................................................10
Figure 13 Forward Engineering step 3........................................................................................10
Figure 14 Forward Engineering step 4.........................................................................................11
Figure 15 Forward Engineering step 5.........................................................................................12
Figure 16 Forward Engineering step 6.........................................................................................13
Figure 17 Forward Engineering step 7.........................................................................................14
Figure 18 not null constraint 1.....................................................................................................15
Figure 19 not null constraint 2.....................................................................................................15
Figure 20 not null constraint 3.....................................................................................................16
Figure 21 primary key constraint 1..............................................................................................16
Figure 22 primary key constraint 2..............................................................................................17
Figure 23 Data type constraint 1..................................................................................................17
Figure 24 Data Type Constraint 2.................................................................................................17
Figure 25 All staff’s details related to the Science Faculty...........................................................18
Figure 26 Staff Id and Staff Name who are working in the Computer Science Department........18
Figure 27 total staff counts in each department..........................................................................19
Figure 28 Student Id, Student Name and the Subjects taken by a specific student.....................19
Figure 29 Students who are studying in the 1st and the 3rd year...............................................20
Figure 30 Students who are not attending the practical exam of a subject.................................20
Figure 31 Highest marks student.................................................................................................21
Figure 32 Lowest student marks..................................................................................................21
Figure 33 report to display the total marks of the students........................................................22
Figure 34 Test 1........................................................................................................................... 23
Figure 35 Test 2........................................................................................................................... 24
Figure 36 test 3............................................................................................................................ 24
Figure 37 test 4............................................................................................................................ 25
Figure 38 test 5............................................................................................................................ 25
Figure 39 test 6............................................................................................................................ 26
2|Page
Figure 40 test 7............................................................................................................................ 26
Figure 41 Student Form............................................................................................................... 28
Figure 42 Faculty Form................................................................................................................ 29
Figure 43 Department Form........................................................................................................ 29
Figure 44 Staff Form.................................................................................................................... 30
Figure 45 course form..................................................................................................................31
Figure 46 Subject Form................................................................................................................32
Figure 47 Marks Form..................................................................................................................33
Figure 48 technical manual 1.......................................................................................................34
Figure 49 Technical Manual 2......................................................................................................35
Figure 50 technical manual 3.......................................................................................................36
Figure 51 Technical Manual 4......................................................................................................36
Figure 52 technical manual 5.......................................................................................................37
Figure 53 Technical Manual 6......................................................................................................37
Figure 54 technical manual 7.......................................................................................................37
Figure 55 technical manual 8.......................................................................................................37
Figure 56 technical manual 9.......................................................................................................38
Figure 57 technical manual 10.....................................................................................................38
Figure 58 technial manual 11.......................................................................................................38
Figure 59 technical manual 12.....................................................................................................38
Figure 60 slide 2........................................................................................................................... 39
Figure 61 slide 1........................................................................................................................... 39
Figure 62 slide 3........................................................................................................................... 40
Figure 63 slide 4........................................................................................................................... 40
Figure 64 slide 6........................................................................................................................... 41
Figure 65 slide 5........................................................................................................................... 41
3|Page
1 Relational Database management System of Houston University
Below, I have created EER diagram for university. This will give a clear point of view for
implement the database for university of Houston. For design this EER diagram, I used MySQL
as a Design tool.
Below, I explained the logical and relational connection between tables which I created for
university.
Faculty Table
4|Page
This table is for store the information of faculties which are in university. This is consisting two
columns which are faculty id and faculty name. both are set as NOT NULL and faculty id is
primary key. This table has one to many relationships with department table where one faculty
can have many departments.
Department Table
This table is use to store department information. This is consisting department id and name.
department id set as primary key. This table has relationship with staff table and course table.
Where on department can have many staff and courses.
Staff Table
this table consist different columns which all are belongs to university staffs. Staff id set as
primary key and all columns set as NOT NULL as well. This table has one to many relationships
with subject table where one staff can do one or more subjects. And also, it has one to one
relationship with staff type table.
5|Page
Figure 5 staff type table
The reason I created this table in our scenario there are several categorize staffs are there such
Senior Professor, Professor, Senior Lecturer, Lecturer, Assistant Lecturer, and Demonstrator. By
using this table, we can categorize staff easily. Staff id set to primary key and other columns are
set as NOT NULL.
Student Table
This table consist different columns which are belongs to university students such as student id,
student name, registration number, and course id. Student id set to primary key. this has a one-
to-one relationship with the student type table where a student can belong one of the 1st
year / 2nd year / 3rd year postgraduate or undergraduate program.
6|Page
Course Table
this table consists different columns which are used to store courses details. Course id set to
primary key. And this table has a one-to-many relationship with the subject table where one
course can have many subjects.
Subject Table
this table consists different columns which are used to store subject details. subject code set to
primary key. And this table has a one-to-many relationship with the marks table where one
subject can have many student marks.
7|Page
Marks Table
this table consists different columns which are used to store students’ marks details. subject
code set to primary key
8|Page
2 Implementing a Physical Relational Database System Using
Forward Engineering Technique
The process of building or creating an application using the specifications provided is known as
"forward engineering." Another name for forward engineering is renovation and reclamation.
High competency abilities are required for forward engineering. The creation or development
of an application requires more time. The process of establishing high-level concepts or designs
before adding complexity and low-level information is known as "forward engineering." As a
result, many packaging and information processes in this type of engineering operate on
entirely distinct principles. To reproduce an existing application, Forward Engineering uses the
entire software engineering process, including the SDLC. It is almost ready to fully satisfy the
users' new re-engineering needs.
Below I attached the steps for implement physical RDS for university using forward engineering
technique in MySQL.
Step 1
after creating EER diagram in MySQL, we select the database which is in top of menu. Inside it,
we click the forward engineer option. Database > Forward Engineer
9|Page
Step 2
After that, we see this page. in this page, we have to set the parameter for connect the DBMS.
Then, we should click next button.
Step 3
10 | P a g e
Then this page allows us to set options for the database to be created and after making the
changes, we need to click Next.
Step 4
in this page, we have to give our MySQL password in order to do other process. After we given the
password, we have to select objects to forward engineer. Then we click next button.
11 | P a g e
Step 5
The following page allow us to review the SQL script to be Executed. We can change the script
as per our requirement, if needed. After that, we click the next button.
12 | P a g e
Step 6
in this page we can see the results of forward engineering. In my case, forward engineering
finished successfully.
13 | P a g e
Step 7
14 | P a g e
3 Data Validation and Verification Process
Making sure that data has these two features involves two crucial processes called data
validation and data verification. Data verification guarantees that all copies of data are as
accurate as the original while data validation ensures that the data is clean, accurate, and
useful. Therefore, both of these procedures ensure that the business does not lose money as a
result of unanticipated data inaccuracies.
Below I explained some of data validation and verification process which are used in SQL.
The term "NULL" is accepted by SQL Server. While there are legitimate uses for NULLS, there
are other obvious situations in which we cannot consider a NULL value. We can establish a NOT
NULL constraint on a table in these circumstances. For example, let’s see the staff type table.
In this table, we set every column to NOT NULL. So, when we enter the information with null
value into this table, it will not allow us to store the values.
15 | P a g e
In above, I insert the information into staff type table without adding staff name. its shows an
error message that ‘staff name doesn’t have a default value’. For avoid this error, we should
enter every column detail in to table such as,
One or more columns with data that specifically identify every row in the table make up the
PRIMARY KEY constraint. The UNIQUE and SQL NOT NULL requirements are combined into the
SQL PRIMARY KEY constraint, which states that a participating column or collection of columns
cannot accept a NULL value. The combined value of all PRIMARY KEY columns must be distinct
even if the PRIMARY KEY is specified in multiple columns. You can insert duplicate values
separately into each column, however. Remember that you can only define one PRIMARY KEY
for each table, and that INT or tiny columns are best for PRIMARY KEYs.
Below, I take faculty table as an example for show the primary key constraint.
Here, I set department id as a primary key. So, when I add the faculties names without faculty
id or if I give information with a duplicate faculty id which is already added for other faculty,
system will show error message. Below I did the two examples as well.
16 | P a g e
Figure 22 primary key constraint 2
This method is used to confirm the kind of information we want to enter into our database. As
an illustration, if we specify an integer as the data type for a field, we are guaranteed to enter
an integer value there. Otherwise, the database will issue an error message that looks like this if
we add any other types of characters.
to avoid this, we should enter correct data types in fields such like this,
17 | P a g e
4 Executing Queries to Generate MIS Reports
I'll test a few of the provided MySQL queries below to see if I can use my database to generate
the required results or not.
Above image shows the staffs details in Houston university who are belongs to science Faculty.
To retrieve these data, I used “select * from staff_tbl where faculty _id = 1;” this query in
database.
b) Staff Id and Staff Name who are working in the Computer Science Department
Figure 26 Staff Id and Staff Name who are working in the Computer Science Department
18 | P a g e
Above image shows the staffs details in Houston university who are working in the computer
science department. To retrieve these data, I used “select staff_id, staff_name from staff_tbl
where department_id = 4;” this query in database.
Above image shows the total number of staffs count in each department of university. To retire this
data, I used “select department_id, department_name, count (*) from department_tbl inner
join staff_tbl on department_id = department_id group by department_id;” this query. Here, I
inner joined staff table and department table then I returned department id and department
name with the total count of staffs.
d) Student Id, Student Name and the Subjects taken by a specific student
Figure 28 Student Id, Student Name and the Subjects taken by a specific student
Above image shows the specific student details like student id, student name and the subject he or she
chose. To retire this data, I used “select student_id, student_name, subject_title from
student_tbl left join subject_tbl on student_tbl course_id = subjects_tbl. Courses_tbl
course_id where student_id = "19502";” this query. Here, I left joined student table and
subject table then I returned student id and student name with the subjects that he or she
chose.
19 | P a g e
e) Students who are studying in the 1st and the 3rd year
Figure 29 Students who are studying in the 1st and the 3rd year
Above image shows the students details with their student year. To retire this data, I used “select
student_tbl. Student_id, student_tbl. Student_name, student_type_tbl. Student_year from
student_Tbl left join student_type_tbl on student_tbl. Student_id = student_type_tbl.
Student_id where student_type_tbl. Student_year = "1st year" or student_type_tbl.
Student_year = "3rd year;” this query. Here, I left joined student table and student type table
then I returned student id and student name with the year that he or she studying.
Figure 30 Students who are not attending the practical exam of a subject
Above image shows the student details who are not attended the practical exam. To retire this data, I
used “select marks_tbl. Student_id, student_tbl. Student_name, marks_tbl. Practical_marks
from marks_tbl left join student_tbl on marks_tbl. Student_id = student_tbl. Student_id
where marks_tbl. Practical_marks = "Not Attend";” this query. Here, I left joined student table
and marks table then I returned student id and name of the students who are not attend
practical exam.
20 | P a g e
g) Students who obtain the lowest and the highest marks in the Assignment
Above image shows the details of a student who got higher marks in the assignment. To retire this data,
I used “select marks_tbl. Student_id, student_tbl. Student_name, MAX (marks_tbl.
Assignment marks) from marks_tbl left join student_tbl on marks_Tbl. Student_id =
student_tbl. Student id;” this query. Here, I left joined student table and marks table then I
returned student id and name of the student who got higher marks in the assignment.
Above image shows the details of a student who got lower marks in the assignment. To retire this data,
I used “select marks_tbl. Student_id, student_tbl. Student_name, MIN (marks_tbl.
Assignment marks) from marks_tbl left join student_tbl on marks_Tbl. Student_id =
student_tbl. Student id;” this query. Here, I left joined student table and marks table then I
returned student id and name of the student who got lowest marks in the assignment.
21 | P a g e
h) A report to display the total marks of the students
Above image shows the total marks and grade details of a students. To retire this data, I used “select
marks_tbl. Student_id, student_tbl. Student_name, marks_tbl. Total_marks, marks_tbl. grade
from marks_tbl left join student_tbl on marks_tbl. Student_id = student_tbl. Student_id;” this
query. Here, its left joined student table and marks table then it’s returned the total marks and
grade of students.
1.
22 | P a g e
5 Test the system against user and system requirements
The database we work with at Houston University, for instance, can be accessed by a variety of
persons, including database administrators, professors, management, and other necessary
authorities. However, if we provide everyone access to the entire database, users might
potentially do anything to it, posing a security risk to our database.
As a result, we can only allow them access to the portions of the database that are required for
work. By applying user privileges to it, we can use these.
we should run the command "select user from MySQL. user;" for check the availability of user.
Figure 34 Test 1
23 | P a g e
5.2 Creating a New User
To create new user, we execute “create user 'test_user'@'localhost' identified by nafrin;” this
query.
Figure 35 Test 2
We may use the same command to check if a new user has been created or not. Then, we can
confirm that the "test user" we created has been established appropriately.
Figure 36 test 3
24 | P a g e
5.4 Granting User Privileges
I used the query "grant all privileges on universitydb. Staff_tbl to 'test user'@ 'localhost';" to
give my new user which is test user permission to access any data from the staffs table.
Figure 37 test 4
To log into a new user account, we must follow the same steps we did to log into the root user
account.
Figure 38 test 5
25 | P a g e
5.6 Removing Privileges
By using revoke, I'm going to deny the test user access to the staff table.
Figure 39 test 6
Here I’m going to delete the test user from user table. Then I rechecked the table whether the
user removed or not.
Figure 40 test 7
In this way, we can manage the system requirements and database user privileges. Additionally,
by employing the user privileges that have been provided, we can secure our database from
outside entities while yet keeping some restrictions on it.
26 | P a g e
6 Houston University’s User and Technical Manual
This is a database system which is created using MySQL as a tool. It is developed for Houston
university. his system was developed by very user friendly and simplest way. So, every user can
easily operate this Houston university management system.
This system allow university to add their university data to Database. By adding data using this
system, they can keep their data safely. The data they inserted stored in relevant tables in
MySQL database.
This system consists 7 different form which are interconnected with relevant tables in database.
They are:
1. Student Form
2. Faculty Form
3. Department Form
4. Staff Form
5. Course Form
6. Subject Form
7. Marks Form
27 | P a g e
Images
Student Form
Users can use this form to insert student information to Database. In order to insert the
information, user must fill all fields. Then, by clicking Add Button, user can add the information.
Using edit button, user can modify the information from table. And, using delete button user
can delete the student information from table.
28 | P a g e
Faculty Form
Users can use this form to insert faculty information to Database. In order to insert the
information, user must fill all fields. Then, by clicking Add Button, user can add the information.
Using edit button, user can modify the information from table. And, using delete button user
can delete the faculty information from table.
Department Form
29 | P a g e
Users can use this form to insert department information to Database. In order to insert the
information, user must fill all fields. Then, by clicking Add Button, user can add the information.
Using edit button, user can modify the information from table. And, using delete button user
can delete the department information from table.
Staff Form
Users can use this form to insert staff information to Database. In order to insert the
information, user must fill all fields. Then, by clicking Add Button, user can add the information.
Using edit button, user can modify the information from table. And, using delete button user
can delete the staff information from table.
30 | P a g e
Course Form
Users can use this form to insert course information to Database. In order to insert the
information, user must fill all fields. Then, by clicking Add Button, user can add the information.
Using edit button, user can modify the information from table. And, using delete button user
can delete the course information from table.
31 | P a g e
Subjects Form
Users can use this form to insert subject information to Database. In order to insert the
information, user must fill all fields. Then, by clicking Add Button, user can add the information.
Using edit button, user can modify the information from table. And, using delete button user
can delete the subject information from table.
32 | P a g e
Marks Form
Users can use this form to insert Student Marks details to Database. In order to insert the
information, user must fill all fields. Then, by clicking Add Button, user can add the information.
Using edit button, user can modify the information from table. And, using delete button user
can delete the student marks details from table.
33 | P a g e
6.2 Technical Manual
34 | P a g e
How To Create a New Database System
35 | P a g e
How To Use Our Database
36 | P a g e
How to Display the Table Structure
Step 1: type “create table table name (field names and data types)”
Step 2: type desc created table name to view the structure of the created table
37 | P a g e
Step 4: type “select * from table_name; to check the entered value
38 | P a g e
7 Future improvements for Houston university management system
Figure 61 slide 1
Figure 60 slide 2
39 | P a g e
Figure 62 slide 3
Figure 63 slide 4
40 | P a g e
Figure 64 slide 5
Figure 65 slide 6
41 | P a g e
8 References
There are no sources in the current document.
42 | P a g e