Download This code is a simple and more Cheat Sheet Law in PDF only on Docsity!
ASSIGNMENT 1 FRONT SHEET
Qualification TEC Level 5 HND Diploma in Computing Unit number and title Unit 04: Database Design & Development Submission date 18 /10/2023 Date Received 1st submission 18 /10/ Re-submission Date Date Received 2nd submission Student Name Duong Cong Thanh Student ID BC Class SE06201 Assessor name Tran Van Nhuom 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 D
Table of Contents
- Table Of FIGURE..........................................................................................................................................................
- Table of table...............................................................................................................................................................
- Introduction.................................................................................................................................................................
- I.Statement of work.....................................................................................................................................................
- 1 .Problem................................................................................................................................................................
- 2 .Solution................................................................................................................................................................
- 3 .Result....................................................................................................................................................................
- 4 .Range....................................................................................................................................................................
- 5 .Aim.......................................................................................................................................................................
- 6 .Task......................................................................................................................................................................
- II.Statement requirements..........................................................................................................................................
- 1 .Scenario................................................................................................................................................................
- 2 .Analysis.................................................................................................................................................................
- III. Database design (P1)..............................................................................................................................................
- Conceptual design...............................................................................................................................................
- 2 .Relationship between entities..............................................................................................................................
- Relationship.........................................................................................................................................................
- Crow's foot notation (ERD)..................................................................................................................................
- Point out the PK (primary key) and FK (foreign key)............................................................................................
- IV.Normalization (M1)...............................................................................................................................................
- 1 .Introduction........................................................................................................................................................
- 2 .Purpose...............................................................................................................................................................
- Standard 1NF format (Richard Peterson, 2022).................................................................................................
- Standard 2NF format (Richard Peterson, 2022).................................................................................................
- Standard 3NF format (Richard Peterson, 2022).................................................................................................
- V.physical design. (M1)..............................................................................................................................................
- 1 .SQL......................................................................................................................................................................
- 2 .Practice design....................................................................................................................................................
- Relationship diagram:........................................................................................................................................
- VI.Interface Design (M1)............................................................................................................................................
- VII.Evaluate the effectiveness of the design in relation to user and system requirements. (D1)..............................
- Conclusion.................................................................................................................................................................
- References.................................................................................................................................................................
- Figure 1.crow's foot notation (ERD)............................................................................................................................. TABLE OF FIGURE
- Figure 2.create cyber game management table........................................................................................................
- Figure 3.Code a computer board...............................................................................................................................
- Figure 4.code customer table....................................................................................................................................
- Figure 5.code employee table...................................................................................................................................
- Figure 6.a machine rental history table.....................................................................................................................
- Figure 7.Create an intermediate table to store relationships between employees and customers..........................
- Figure 8.Create relationships between employees and invoices...............................................................................
- Figure 9.Relationship diagram...................................................................................................................................
- Figure 10.login form..................................................................................................................................................
- Figure 11.computer form..........................................................................................................................................
- Figure 12.customer form...........................................................................................................................................
- Figure 13.employees form.........................................................................................................................................
- Figure 14.Machine rental history...............................................................................................................................
- Table 1.CONCEPTUAL DESIGN..................................................................................................................................... TABLE OF TABLE
- Table 2. Point out the PK (primary key) and FK (foreign key)......................................................................................
- Table 3.Create a computer board..............................................................................................................................
- Table 4.create customer table...................................................................................................................................
- Table 5.create employee table..................................................................................................................................
- Table 6.Create a machine rental history table...........................................................................................................
INTRODUCTION
Cyber games are an attractive entertainment destination where everyone can unleash their passion for games. With high-configuration computers, modern gadgets and comfortable spaces, cyber games are the ideal destination for gamers. At cyber game, players can experience the latest game titles with top graphics and vivid sound. In addition, cyber games are also a place for gamers to socialize, make friends and participate in professional gaming tournaments. Thanks to the development of technology, cyber games are becoming more modern and more convenient. Today's cyber games not only have high- configuration computers but also have amenities such as massage chairs, curved screens, surround sound,... Cyber games have become an indispensable part of young people's lives. Here, gamers can unleash their passion, relieve stress and bond with each other. And in today's report, I will present a database system to manage a basic cyber game
5 .AIM
Create a reliable storage and management, easier to use and harder to lose customer information. Save labor and labor costs.
6 .TASK
To complete this task, we have made our best efforts over the years, constantly improving working functions, gathering all the requirements of different cyber games, database users. Welcome when there is bad feedback about the system being difficult to use or having errors that lead to loss of cyber information or misunderstandings II.STATEMENT REQUIREMENTS
1 .SCENARIO
You are an employee as a Database Developer for a large IT consulting company. The company was approached by CYBER GAME which was expanding due to its growing number of customers. Cyber games are currently having difficulty managing the essentials. It decided to develop some Academic system to manage cyber games more easily. Some requirements that need to be resolved include:
- Provide numbers that are empty and occupied without having to search manually.
- Provide information about customer accounts.
- Provide employee information.
- Indicate how much it costs to rent per hour.
- Search and retrieve by having a piece of employee information.
2 .ANALYSIS
- Pc needs the following information: id, name, configuration, price, status
- Customers need the following information: id, name, email, phone_number, birthday
- Employees need to have the following information: id, name, position, salary
- Machine rental history needs the following information: ID,customer id, computer id, start time, end time, price
III. DATABASE DESIGN (P1)
1. CONCEPTUAL DESIGN
Entity Description Of Entity Attribute Description Of Attribute Computers Is an entity that contains information ID Unique identifier for the computer Name the name of the computer Configuration Machine information base Price Machine rental price per hour Status Is there a tenant or not? Customers contains information about the customer ID Unique identifier for the customer Name customer's name Email customer's email Phone_number customer's Phone Number Birthday customer's birthday Employees contains information about employees ID Unique identifier for the employee Name user name Position The staff interface is functional Salary the amount of money the employee receives Machine rental history contains information about the machine rental time of each customer ID Unique identifier for the invoice Customer id Unique identifier for the customer Computer id Unique identifier for the computer Price Machine rental price per hour Start time rental start time End time rental end time Table 1 .CONCEPTUAL DESIGN
2 .RELATIONSHIP BETWEEN ENTITIES
Relationship
One customer can rent multiple machines
ID_ Employees ID_ Machine rental history
Table 2. Point out the PK (primary key) and FK (foreign key)......................................................................................
IV.NORMALIZATION (M1)
1 .INTRODUCTION
The majority of web applications require a database to store data, process information, provide statistical reports, and allow search. If the online software works properly, the most important factor is to have an effective database. Given this, I'm sure that database architecture is critical; good planning will result in significant time savings during the development process. Based on it’s convenience, this database is also normalized
2 .PURPOSE
There are 2 main purposes: Removing anomalies from database. Avoid redundancies in database. The lecturer has asked for three types of database normalization 1st Normal Form (1NF). 2nd Normal Form (2NF). 3rd Normal Form (3NF). The standards forms are presented from low to high in ascending order. Your database must adhere to standard 1NF in order to standardize 2NF, and if you comply with standard 3NF, you must also comply with standards 1NF and 2NF
Standard 1NF format (Richard Peterson, 2022)
In order to meet the 1NF, we must follow those rules: Rule 1: Each table cell should contain a single value. Rule 2: Each record needs to be unique. Steps to get 1NF:
Verify that the relationship has developed into the typical INF format. If there is no prime/repeat attributes at INF, then there are none; separate those attributes. Evaluate the status of the assignment: Met
Standard 2NF format (Richard Peterson, 2022)
In order to meet the 2NF, we must follow those rules: Rule 1- Be in 1NF. Rule 2- Single Column Primary Key that does not functionally dependant on any subset of candidate key relation. Steps to get 2NF: Non-key attributes that rely on a primary key element should be removed and moved to a special table, with the primary key of the table serving as the element that they depend on. The original primary key functions as the primary key in a relationship with the remaining attributes. Evaluate the status of the assignment: Met.
Standard 3NF format (Richard Peterson, 2022)
In order to meet the 3NF, we must follow those rules: Rule 1- Be in 2NF. Rule 2- Has no transitive functional dependencies. Steps to get 3NF: Eliminate the bridging dependencies from the relationship and separate it into private relations with the bridging property serving as the primary key. Using the primary key as the primary key, the remaining qualities come together to establish a connection. Evaluate the status of the assignment: Met
Figure 2.create cyber game management table........................................................................................................
Column name Type Constraint Note ID Varchar(255) PK, no null Name Varchar(255) None configuration Varchar(255) None price Float None Status Varchar(255) None
Table 3.Create a computer board..............................................................................................................................
Figure 3.Code a computer board...............................................................................................................................
Column name Type Constraint Note ID Varchar(255) PK, no null Name Varchar(255) None email Varchar(255) None phone_number Varchar(255) None birthday Date None
Table 4.create customer table...................................................................................................................................
Figure 4.code customer table....................................................................................................................................
Column name Type Constraint Note
Column name Type Constraint Note ID Varchar(255) PK, no null customer id Varchar(255) None computer id Varchar(255) None price Float None start time Date None end time Date None
Table 6.Create a machine rental history table...........................................................................................................
Figure 6.a machine rental history table.....................................................................................................................
Figure 7.Create an intermediate table to store relationships between employees and customers..........................
Figure 8.Create relationships between employees and invoices...............................................................................
Relationship diagram:
Figure 9.Relationship diagram...................................................................................................................................
VI.INTERFACE DESIGN (M1) In order to interact with users, I create those interfaces