0% found this document useful (0 votes)
58 views

Database Design Development

This document provides details about implementing and testing a relational database system for Houston University. It includes information on: 1) Creating database tables using an EER diagram and forward engineering technique; 2) Adding data validation rules like NOT NULL constraints and primary keys; 3) Executing queries to generate management information system reports; 4) Testing the system against user and technical requirements.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views

Database Design Development

This document provides details about implementing and testing a relational database system for Houston University. It includes information on: 1) Creating database tables using an EER diagram and forward engineering technique; 2) Adding data validation rules like NOT NULL constraints and primary keys; 3) Executing queries to generate management information system reports; 4) Testing the system against user and technical requirements.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 43

!

Unexpected End of Formula

Pearson
Higher Nationals in
Computing
Unit 14: Database Design and Development

Assignment Brief Number: 1


Table of Contents
1 Relational Database management System of Houston University.........................................4
2 Implementing a Physical Relational Database System Using Forward Engineering Technique
9
3 Data Validation and Verification Process.............................................................................15
3.1 NOT NULL Constraints...................................................................................................15
3.2 PRIMARY KEY constraint................................................................................................16
3.3 Data Type Constraint.....................................................................................................17
4 Executing Queries to Generate MIS Reports........................................................................18
5 Test the system against user and system requirements......................................................23
5.1 Checking the available users.........................................................................................23
5.2 Creating a New User......................................................................................................24
5.3 Check Available Users....................................................................................................24
5.4 Granting User Privileges................................................................................................25
5.5 Logging to a New User Account.....................................................................................25
5.6 Removing Privileges...................................................................................................... 26
5.7 Deleting the New User Account....................................................................................26
6 Houston University’s User and Technical Manual................................................................27
6.1 User Manual..................................................................................................................27
6.1.1 System Summary....................................................................................................27
6.1.2 General Information...............................................................................................27
6.1.3 System Overview....................................................................................................27
6.1.4 System Menu......................................................................................................... 27
6.2 Technical Manual.......................................................................................................... 34
7 Future improvements for Houston university management system...................................39
8 References........................................................................................................................... 42

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.

Figure 1 EER Diagram

Below, I explained the logical and relational connection between tables which I created for
university.
Faculty Table

Figure 2 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

Figure 3 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

Figure 4 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

Figure 6 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.

Figure 7 student type table

this table is use to store the student’s program year.

6|Page
Course Table

Figure 8 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

Figure 9 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

Figure 10 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

Figure 11 Forward Engineering 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

Figure 12 Forward Engineering 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

Figure 13 Forward Engineering 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

Figure 14 Forward Engineering 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

Figure 15 Forward Engineering 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

Figure 16 Forward Engineering 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

Figure 17 Forward Engineering step 7

From here, we can see that our database created successfully.

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.

3.1 NOT NULL Constraints

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.

Figure 18 not null constraint 1

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.

Figure 19 not null constraint 2

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,

Figure 20 not null constraint 3

3.2 PRIMARY KEY constraint

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.

Figure 21 primary key constraint 1

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

3.3 Data Type Constraint

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.

Figure 23 Data type constraint 1

to avoid this, we should enter correct data types in fields such like this,

Figure 24 Data Type Constraint 2

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.

a) All staff’s details related to the Science Faculty

Figure 25 All staff’s details related to the Science Faculty

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.

c) Summary report to list the total staff counts in each department

Figure 27 total staff counts in each department

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.

f) Students who are not attending the practical exam of a subject

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

Highest student marks in Assignment

Figure 31 Highest marks student

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.

Lowest Student Marks in Assignment

Figure 32 Lowest student marks

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

Figure 33 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.

5.1 Checking the available users

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

5.3 Check Available Users

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

5.5 Logging to a New User Account

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

5.7 Deleting the New User Account

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

6.1 User Manual

6.1.1 System Summary

Database Name: Houston University Management System


Tool/Software: MySQL

6.1.2 General Information

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.

6.1.3 System Overview

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.

6.1.4 System Menu

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

Figure 41 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

Figure 42 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

Figure 43 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

Figure 44 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

Figure 45 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

Figure 46 Subject 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

Figure 47 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

How To Connect MySQL Server

Figure 48 technical manual 1

Step 1: open CMD


Step 2: set path = your MySQL bin location
Step 3: type “mysql -h localhost -u root -p”

34 | P a g e
How To Create a New Database System

Figure 49 Technical Manual 2

Step 1: type “create database ‘database name’”


Step 2: type show databases to confirm Whether the database is created.

35 | P a g e
How To Use Our Database

Figure 50 technical manual 3

Step 1: type “use ‘your database Name’”

How to Display the Tables in a Database

Figure 51 Technical Manual 4

Step 1: change to our database


Step 2: type “show tables”

36 | P a g e
How to Display the Table Structure

Figure 52 technical manual 5

Step 1: type “desc table name”

How To Create a Table and Insert Records

Figure 53 Technical Manual 6

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

Figure 54 technical manual 7

Step 3: type “insert into table_name (field names) values (values);

Figure 55 technical manual 8

37 | P a g e
Step 4: type “select * from table_name; to check the entered value

Figure 56 technical manual 9

How To Modify a Table Records

Figure 57 technical manual 10

Step 1: type “alter table table_name”


Step 2: Type the command that you need to execute example modify column ‘column name’
varchar ()15;

How To Delete a Table

Figure 58 technial manual 11

Step 1: type “drop table table_name”

How To Quit the Database

Figure 59 technical manual 12

Step 1: type “quite”

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

You might also like