You are on page 1of 23

ASSIGNMENT 1 FRONT SHEET

Qualification TEC Level 5 HND Diploma in Computing

Unit number and title Unit 04: Database Design & Development

Submission date 10/21/2022 Date Received 1st submission 10/21/2022

Re-submission Date Date Received 2nd submission

Student Name Chan Duc Luong Student ID BH00108

Class IT0502 Assessor name Ngo Thi Mai Loan

Student declaration

I certify that the assignment submission is entirely my own work and I fully understand the consequences of plagiarism. I understand that
making a false declaration is a form of malpractice.

Student’s signature

Grading grid

P1 M1 D1
 Summative Feedback:  Resubmission Feedback:

Grade: Assessor Signature: Date:


Signature & Date:
Contents
I. Introduction ....................................................................................................................................................................................................... 5
II.Content .............................................................................................................................................................................................................. 5
1. Database design ............................................................................................................................................................................................. 5
2. Scenario of the chosen system ....................................................................................................................................................................... 8
3. Logical Design .............................................................................................................................................................................................10
4. Physical Design ............................................................................................................................................................................................13
III. Conclusion .......................................................................................................................................................................................................23

Photo Content

Feature

features 1 .............................................................................................................................................................................................................. 9
features 2 .............................................................................................................................................................................................................13
Figure

Figure 1 ................................................................................................................................................................................................................. 6
Figure 2 ................................................................................................................................................................................................................. 6
Figure 3 ................................................................................................................................................................................................................. 7
Figure 4 ................................................................................................................................................................................................................. 7
Figure 5 ................................................................................................................................................................................................................. 8
Figure 6 ................................................................................................................................................................................................................. 8
Figure 7 ................................................................................................................................................................................................................. 8
Table

Table 1 .................................................................................................................................................................................................................15
Table 2 .................................................................................................................................................................................................................15
Table 3 .................................................................................................................................................................................................................16
Table 4 .................................................................................................................................................................................................................16
Table 5 .................................................................................................................................................................................................................17
Example

Example 1.............................................................................................................................................................................................................14
Example 2.............................................................................................................................................................................................................18
Example 3.............................................................................................................................................................................................................19
Example 4.............................................................................................................................................................................................................19
Example 5.............................................................................................................................................................................................................20
Example 6.............................................................................................................................................................................................................21
Example 7.............................................................................................................................................................................................................21
Example 8.............................................................................................................................................................................................................22
Example 9.............................................................................................................................................................................................................23
I. Introduction
Currently, for many businesses, with the huge amount of data they have, it is impossible to record all of them in a single book, so
today I will introduce to everyone a way that can store a large amount of data. that data and instructions to create a student grading
system.

II.Content

1. Database design
- Database is an organized collection of data that is usually accessed from a computer system or exists as a file in a database
management system. Database can also be stored on memory devices such as memory cards, hard disks, CDs, etc.

Database plays an extremely important role when working with data systems. They help the user to successfully connect the data.
Users can access the database system faster and easier. Database is the source base for users to access the necessary information.

The main feature of the Database is to retrieve information and data by many different methods. The retrieved contents are
guaranteed to have a high degree of data integrity. At the same time, the output information source is not duplicated at all, if there is,
the probability is also very low. A database database allows multiple users to access concurrently at the same time.
Figure 1

- The wrongly designed database makes it easier to create, update and exploit information. The data will be updated regularly and will
not be duplicated at all. Using a database helps to create more professional products, systematically store them, and easily manage
them.
Figure 2
We have some commonly used databases:

#1. MySQL.
Figure 3

#2. MariaDB.
Figure 4

#3. Oracle.
Figure 5

#5. PostgreSQL.
Figure 6

#6. Microsoft SQL Server.


Figure 7

2. Scenario of the chosen system


- Provide a choice scenario for system design
Currently, FPT is in need of exam management software to score students' test scores. Examination management database includes the
following information:

+ Students include information such as: StudentID, StudentName, Class.

+ The test includes information such as: StudentID, StudentName, Point, Subject, Class

+ Teachers include information such as: TeacherID, TestID, Class

features 1

Functions corresponding to each user:

Students can take the test and view the test scores in the grading system.

Teachers can grade students' tests, edit and view student test scores.
3. Logical Design
Define: Logical design represents relationships between objects. Entity-relationship (ER) modeling techniques can be used for logical
designs of Data Warehouses. The ER model is concerned with identifying entities - entities (important objects), attributes - attributes
(properties about objects) and relationships - relationships between them.

- DBMS: stands for Database Management System, DBMS is software designed to be able to define, perform operations, retrieve and
manage data in a Database. DBMSs are typically capable of manipulating the data itself, data formats, field names, record structures,
and file structures. It also defines rules for validating and manipulating data.

- Tables are essential objects in a database because they contain all the information or data.

-The Primary Key uniquely identifies each of the data in the table.

+The primary key must contain a unique value and must not contain a null value.

+A table can have only one primary key, and in a table, this primary key can consist of one or more columns (fields).

- Relationship:

+ One-to-many relationship

A 1-to-many relationship is a row of a one-to-many table that is associated with many rows of a many-to-many table. In other words,
many rows of many tables are linked to a row in table one

+ Many-to-many relationship

a many-to-many relationship is that 1 row of one table can be linked to many rows in another table, and 1o rows on the other table are
similar.

+ One-on-one relationship
In a one-to-one relationship, each record in the first table can have only one record that matches the second table, and each record in
the second table can have only one record that matches the first. Relationships are unusual, as most commonly information that is
related in this way must be stored in the same table.

- Building Entities

Entity Description of Attribute Description of


Entity Attribute
Students All students in StudentID Primary key. It is
website a unique
identifier for
each student in
the application
StudentName Name of the student

ClassID Name of class


Number Number of student
Address Address of student
Teacher The teacher marks the students' TeacherID Primary key. It is
exams a unique
identifier for
each Teacher in
the application
ClassID ID of class
TeacherName Name of teacher
Test The test is the student's work TestID Primary key. It is
a unique
identifier for
each test in
the application
StudentID StudentID of the student do
test
Point point of the test
StudentID ID of student
SubjectName Name of subject
Class Class of student and Teacher ClassID Primary key. It is
a unique
identifier for
each Class in the application
ClassName name of class

Relationships between objects:

-1 student studying only 1 class :1-1

-1 class with many students:1-m

-1 student can take multiple tests:1-m

-1 test belongs to only 1 student:1-1

-1 subject will have 1 corresponding test: 1-1

-1 test with only 1 subject:1-1

-1 teacher only grade 1 class:1-1

-1 class is graded by many teacher:1-m


features 2

4. Physical Design
-The physical design represents an efficient way to store and retrieve data. In physical design, the logical design needs to be converted
into a description of the physical database structures. In other words, the physical design affects the physical environment of the data,
and is transformed from the structure of the previous logical design.

-Command to create table


Example 1
Table 1

Table of student
Table 2

Table of subject
Table 3

Table of class
Table 4

Table of teacher
Table 5

Table of test
Example 2

Diagram

Commands DDL:

CREATE – used to create new objects in the database such as database, table, function, stored procedure, trigger.
Example 3

ALTER - used to modify objects such as table (add column), column (modify data type), trigger (modify content).

Example 4

Commands DML

INSERT – adds data to a table in the database.


Example 5

UPDATE – modify data in a table.


Example 6

DELETE – deletes a row of data in the table.

Example 7

SELECT - query data.


Example 8
Example 9

III. Conclusion
With the above system design, we can manage students' grading easily. Teachers can view and edit, students can only view. A system that helps
a lot in a school.

You might also like