Nguyễn Đức Thịnh (BKC12334) - Assignment 1- Database Design and Development
Nguyễn Đức Thịnh (BKC12334) - Assignment 1- Database Design and Development
Internal verification:
Higher Nationals
Submission Format
LO1 Use an appropriate design tool to design a relational database system for a
substantial problem.
LO2 Develop a fully functional relational database system, based on an existing system
design.
Part 1 (LO1)
Before you start the development process, your manager has asked you to produce a
detailed report for the CEO of BKC.
Using appropriate tools and techniques, you will produce a comprehensive design for a
fully functional relational database system which will include at least four example tables,
interface, and output designs, data validations, and cover data normalization. They would
also like you to evaluate your design with the client’s requirements.
Part 3 (LO4)
Finally, BKC has asked that technical and user documentation be also produced for
distribution to a staff of varying computer literacy to help them navigate the database’s
interfaces. To aid future maintenance and continued system effectiveness, the flow of data
through the system should be shown as well as suggested improvements to the database
system.
P3 Implement a query
language into the relational M3 Assess whether
D3 Evaluate the database in
database system. meaningful data has been
terms of improvements
extracted through the use of
needed to ensure the
query tools to produce
appropriate management continued effectiveness of
information.
II. Problem………………………………………………………………………………….15
III. Object…………………………………………………………………………………..16
LO2 Develop a fully functional relational database system, based on an existing system
design……………………………………………………………………………………….21
I. Code………………………………………………………………………………………21
Databases are the main in the most of the system in the modern world. It is designed and
buildup with the user requirements, software requirements and hardware requirements. A
database which contains databases, tables of data and maintain by the Database Management
System (DBMS) with applications controlled that databases. Databases are like Backend
work process because the Frontend (Applications) are direct the databases.
Types of Databases
Transactional Databases – Main function of this database is to add new data, change
existing data, delete existing data. Eg: Client – Server Database
Decision Support System (DSS) Database– They support decisions.
Hybrid – It is a mixture of OLTP (On -line transaction processing) and data
warehouse throughout requirements.
Functions of DBMS
Data Storage – Database can access by many users so they can storage, retrieve and
update data.
Retrieve Data
Update Data
Data Communication Interfaces – Telecommunications can allow to transactions of
data through remote so, DBMS must provide an interface to assist the transactions.
Database Design
Collecting Information
Strategy & Planning Process
Design & Implement Process
Data collecting is the main purpose in creating a database system because users will tell
about their requirements (They can have a imagination that is how our system would be like).
As a Database designer we need to consider about the software requirements and hardware
requirements. Planning will make the system more accurate and we will find the new needs to
fulfill the customers(users). Designing will allow to create a logical and physical design and
able to identify what are additional use to make the system effectively and after that the
development phase will start.
Keys
Primary Key: Primary key is used to uniquely identify the record in the tables. A table
wants a unique identification because there is no way to find a record without possible of
finding more than one record. So, primary key is a heart of a table.
Foreign Key: Foreign key is the copy of the primary keys. If you get a primary key from a
table and when you put that key into another table it will be as foreign key. After that we will
derive all data to that primary key located table to foreign key located table.
Relationships in Database
A relational database collects different types of data sets that use tables, records, and
columns. It is used to create a well-defined relationship between database tables so that
relational databases can be easily stored. For example of relational databases such as
Microsoft SQL Server, Oracle Database, MYSQL, etc.
All entities in a database will connected through the relationship. They are:
One to One Relationship (1:1): It is used to create a relationship between two tables
in which a single row of the first table can only be related to one and only one records
of a second table. Similarly, the row of a second table can also be related to anyone
row of the first table.
One to Many Relationship: It is used to create a relationship between two tables.
Any single rows of the first table can be related to one or more rows of the second
tables, but the rows of second tables can only relate to the only row in the first table. It
is also known as a many to one relationship.
Many to Many Relationship: It is many to many relationships that create a
relationship between two tables. Each record of the first table can relate to any records
(or no records) in the second table. Similarly, each record of the second table can also
relate to more than one record of the first table. It is also represented
an N:N relationship.
Figure 2: Relationships in Database
Normalization
Benefits of Normalization
A large database defined as a single relation may result in data duplication. This
repetition of data may result in:
So to handle these problems, we should analyze and decompose the relations with
redundant data into smaller, simpler, and well-structured relations that are satisfy desirable
properties. Normalization is a process of decomposing the relations into relations with fewer
attributes.
An E-R model is usually the result of systematic analysis to define and describe what is
important to processes in an area of a business. It does not define the business processes; it
only presents a business data schema in graphical form. It is usually drawn in a graphical
form as boxes (entities) that are connected by lines (relationships) which express the
associations and dependencies between entities. An ER model can also be expressed in a
verbal form, for example: one building may be divided into zero or more apartments, but one
apartment can only be located in one building.
Entities may be characterized not only by relationships, but also by additional properties
(attributes), which include identifiers called "primary keys". Diagrams created to represent
attributes as well as entities and relationships may be called entity-attribute-relationship
diagrams, rather than entity–relationship models.
In this assignment the enrollment system will help university easier to manage student,
course and easy to student to view the course they take part in. Which is need for the new
students and new teachers, simple for using in many consoles. This new system will have
high security for teacher to edit and view status course and student. Simple interface for
student and teachers to use, staff can edit and modify system.
• Time: 4 months
• Budget: 20.000.000 VND
• Users: Student, teacher, staff support
• Campus: for all campus of Greenwich
• Modules included in the project: calendar
• Business rules
Course Enrollment
Subject will required all info classNo and subjectsNo,teacherNo which is primary key
Class
Subjects
Student
I. CODE
use courseenrollment;
);
);
);
);
);
);
delete from course where course_no = '2'; and can add more information
teacher view:
Staff view:
staff view:
Staff can edit, delete the information have choose For example : delete from class where
class_no = '606' ; Staff Add more information:
Subject table staff view: Staff delete the information subject subject delete from subjects
where subjects_no = 'GCH0606'; and edit ,add more information :
Download MySQL
Figure 15
Click and enter the password
Figure 16.
Figure 17
Paste in and run the code
Figure 18
Figure 19
How to use
User will choose the roles view, or edit the course Each option have difference
permission For example staff can edit, update and delete information of course, course
enrollment and teacher, class,.. Teacher can view the course take part in, and see the
upcoming course , and student take part in class Student can only view the status of course
and teacher take part in the course User will have an interface like this, to view edit or delete.
Staff can delete the line user has choose and refill the blank:
Only staff can edit the system, student and teacher can view the interface
Staff can Select a line and edit ,delete it, or can fill the information:
Insert information:
Class
teacher can easier view the subject to study ,student will know the subject tiles
Subject
update teacher set full_name = 'Nguyen Han Anh' where teacher_no= '0406';
Teacher have permission to view the table but only staff can edit and modify.
subjects learn
teacher of subject
place to study