Docsity

Assignment1 - 1620 -pass., Assignments of Information Technology

Toggle sidebar
bg1
ASSIGNMENT 1 FRONT SHEET
Qualification
TEC Level 5 HND Diploma in Computing
Unit number and title
Unit 04: Database Design & Development
Submission date
Date Received 1st submission
Re-submission Date
Date Received 2nd submission
Student Name
Trần Văn Tưởng
Student ID
GCH211184
Class
GCH1107
Assessor name
Trần Thị Thoa
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
Tưởng
Grading grid
P1
M1
D1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Assignment1 - 1620 -pass. and more Assignments Information Technology 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 Date Received 1st submission Re-submission Date Date Received 2nd submission Student Name Trần Văn Tưởng Student ID GCH Class GCH1107 Assessor name Trần Thị Thoa 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 Tưởng Grading grid

P1 M1 D

 Summative Feedback:  Resubmission Feedback:

Grade: Assessor Signature: Date: Signature & Date:

  • I. Statements of user and system requirements
      1. Overview about the Problem
      1. System Requirement Specification
  • II. Design the relational database system
      1. Analyse the requirements
      1. Database design with explanations
      • 2.1. Logical ERD
      • 2.2. Explain
      1. Review whether the database is normalized
      • 3.1. Define of normalized
      • 3.2. Normalized in work
      • 3.3. Common normalization types
      • 3 .4. Normalization in the report
      1. Data validation
      1. Wireframe of the application
  • References
  • Figure 1:Physical EDR Contents of figure:
  • Figure 2:Data validation
  • Figure 3:Registration page
  • Figure 4:Login page
  • Figure 5:Main page
  • Figure 6:Cart page

I. Statements of user and system requirements

1. Overview about the Problem

I work as a database developer for a significant IT consulting firm. FPT Shop, which is growing as a result of the increase in the number of stores, has contacted the business. FPT Shop is presently having trouble handling the management of the database from all shops across the nation. They want the homepage interface to keep up with the market's trends and tastes because their current system frequently causes lag and cannot keep up with the demands of the market's continued development. Preliminary research indicates that FPT Shop is an online retailer that specializes in selling electronic products like phones, washing machines, and household appliances. It was decided to create a new database so that users could register using their phone numbers as IDs and order, rate, and remark on the devices they had purchased, shop managers could look after their stores, and the director board could view all of the data from all of the shops. We also create a new, user-friendly interface for them so that users can reach them more easily.

2. System Requirement Specification

Reasons for the project: A business needs to build a database to help manage the buying and selling of game discs for that store because they are having some trouble keeping track of the purchases in their game store. Requirements and Expectation: The created database must satisfy fundamental requirements like simple access, storage, administration, and updating. The information must also be protected from outside access while still being accessible. At the same time, they must adhere to all the guidelines provided by the scenario. Objectives (Things intended to achieve): The database must provide sufficient features for adding, deleting, and editing data as well as for swiftly and easily accessing it by users. It must also guarantee the database's security.

II. Design the relational database system

1. Analyse the requirements

The management of the databases from all shops is a prerequisite of FPT shops. To begin with, the system must demand that users register and login using their phone numbers. We have Customer_Infomation table includes Customer_ID, Name, Email, Password, Sex, Age. Table is used to identify user login into system.

Figure 1 :Physical EDR 2.2.Explain On the diagram there are 7 related tables: The Director_road table and the manager table have a one-to-many relationship because a managing director can manage multiple managers at the same time. The manager table has a foreign key reference to the Director_broad table allowing the managing directors to be managed by the managing directors. The manager table and the shop table have a one-to-many relationship because a manager can manage multiple shop at the same time. The shop table has a foreign key reference to the manager table. It allows the manager to view and manage the store.

The shop table and the product table have a many-to-many relationship because a shop has many products and a product can be sold in many shops. The oder table and the product table have a one-to-many relationship because a product can receive many orders. The oder table has a foreign key reference to the products table to identify the products the customer wants to buy. The oder table and the customer_information table have a one-to-many relationship because a customer can order many products at once. The oder table has a foreign key reference to the customer_information table to identify the customer's information when placing an order. The customer_information with the comment table has a one-to-many relationship because a customer can write many comments at the same time. The comment table has a foreign key reference to the customer_information so that it can display the reviewer's name and help the store improve their product. The comment table and the oder table have a one-to-many relationship because a order can receive many comments from customers. The comment table has a foreign key reference to the oder table to determine which orders are rated and rated by customers.

3. Review whether the database is normalized

3.1.Define of normalized The process of rearranging data in a database so that users can use it for additional queries and analysis is known as data normalization. It is, in a nutshell, the process of creating clean data. Making the data appear consistent across all records and fields and removing unnecessary and unstructured data are two examples of how to do this. Advantages of Normalization: There are many benefits to normalizing a database. Some of the main advantages are as follows:

  • Utilizing normalized database or data redundancy
  • Duplication might be removed.
  • Reduced null values may result from normalization.
  • Produces a smaller database (since there is zero or less data duplication).
  • Reduce/avoid problems caused by data alteration.
  • It simplifies the questions.
  • The database's structure is clearer and easier to understand.

3.3.Common normalization types Data normalization can be broken down into various normal forms. The three most widely used are 1NF, 2NF, and BCNF First Normal Form (1NF) 1NF, the simplest type of data normalization, makes sure there are never two identical entries in a group. The following conditions must be met for a table to be in the first normal form:

  • There should only be one value in each cell.
  • Each record needs to be distinct. Second Normal Form, or 2NF All the data subsets that can be arranged in multiple rows are organized into different tables in a 2NF table. A table must conform to the following conditions in order to be in the second normal form:
  • It ought to be in 1F.
  • There shouldn't be any functional dependencies between the candidate keys and the primary key. Third Normal Form (3NF) A table must conform to the following conditions in order to be in the third normal form:
  • It ought to be in 2F.
  • It shouldn't be dependent on anything in a functionally transferable way. When a change in one column—one that isn't a main key—could result in changes in any of the other columns, such situation is known as a transitive functional dependency. Boyce and Codd Normal Form, or BCNF The Boyce and Codd Normal Form, or 3.5NF, is a more advanced variation of the 3NF. A 3NF table that lacks many overlapping candidate keys is known as a BCNF. A table must go by the following guidelines in order to be included in BCNF:
  • It ought to be in 3F.
  • X should be a super key for each functional dependency (X Y) that exists. 3.4.Normalization in the report Director_broad table: 1NF: Each attribute in the Director_broad table contains atomic values. There is a primary key (Director_ID) for each record, which uniquely identifies each manager. 2NF: There is only one primary key (Director_ID) in the Director_broad table and all non-key attributes depend on it. Therefore, the Director_broad table satisfies the second normal form so the Director_broad table is in 2NF. Manager table: 1NF: Each attribute in the Manager table contains atomic values. There is a primary key (Manager_ID) for each record, which uniquely identifies each manager. 2NF: There is only one primary key (Manager_ID) in the Manager table and all non-key attributes depend on it. In addition, there is a foreign key (Director_id) that refers to the primary key of the Director table. Therefore, the Manager table satisfies the second normal form so the Manager table is in 2NF. Shop table: 1NF: Each attribute in the Shop table contains atomic values. There is a primary key (Shop_ID) for each record, which uniquely identifies each manager. 2NF: There is only one primary key (Shop_ID) in the Manager table and all non-key attributes depend on it. In addition, there is a foreign key (Manager_id) that refers to the primary key of the Manager table. Therefore, the Shop table satisfies the second normal form so the Shop table is in 3NF. Product table: 1NF: Each attribute in the Product table contains atomic values. There is a primary key (Product_ID) for each record, which uniquely identifies each manager.

4. Data validation

Table Name Data type Null Primary key or Foreign Key Customer_Information Customer_ID Int(10) Not Null PK Name Varchar(20) Not Null Email Varchar(20) Not Null Password Varchar(20) Not Null Sex Varchar(20) Null Age Int(10) Null Director_board Director_ID Int(10) Not Null PK Name Varchar(20) Not Null Sex Varchar(20) Not Null Age Int(10) Not Null Manager Manager_ID Int(10) Not Null PK Director_ID Int(10) Not Null FK Name Varchar(20) Not Null Age Int(10) Not Null Shop Shop_ID Int(10) Not Null PK Manager_ID Int(10) Not Null Fk Revenue Int(20) Not Null Product Product_ID Int(10) Not Null PK Shop_ID Int(10) Not Null Fk Price Int(20) Not Null Name Varchar(20) Not Null Picture Varchar(20) Not Null Describe Varchar(20) Not Null Oder Oder_ID Int(10) Not Null PK Product_ID Int(10) Not Null FK Customer_ID Int(10) Not Null FK Price Int(10) Not Null Quantity Int(10) Not Null Comment Comment_ID Int(10) Not Null PK Oder_ID Int(10) Not Null Fk

Customer_ID Int(10) Not Null FK Comment Varchar(20) Null Star_rating Int(10) Null Figure 2 :Data validation

5. Wireframe of the application

Figure 3 :Registration page Users can create an account here to login to the site.

Figure 5 :Main page This is a home page where customers can see products and view information about them.

Figure 6 :Cart page This is a shopping cart page where customers can add products to their cart and order them

References

What is Normalization of Data in Database? (2023). Available at: https://www.simplilearn.com/automated-recruiting-in-companies- article (Accessed: 14 April 2023).