1. Trang chủ
  2. » Luận Văn - Báo Cáo

Assignment 2 1622 Database Design Development Distinction

87 1 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Database Design & Development
Tác giả Tran Duc Long
Người hướng dẫn Dinh Duc Manh
Trường học tec
Chuyên ngành computing
Thể loại assignment
Năm xuất bản 2023
Định dạng
Số trang 87
Dung lượng 5,16 MB

Nội dung

This exercise scores Distinction in database programming. This exercise demonstrates how to code a database, database query syntax, and ways to normalize data while developing a system in Microsoft SQL.

ASSIGNMENT FRONT SHEET Qualification TEC Level HND Diploma in Computing Unit number and title Unit 04: Database Design & Development Submission date 04/03/2023 Date Received 1st submission Re-submission Date 04/03/2023 Date Received 2nd submission Student Name Tran Duc Long Student ID GCH210562 Class GCH1106 Assessor name Dinh Duc Manh 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 P2 P3 P4 P5 M2 Page of 86 M3 M4 M5 D2 D3  Summative Feedback:  Resubmission Feedback: 2.1 2.2 Grade: Signature & Date: Assessor Signature: Date: Page of 86 Table of Contents A Introduction B C Task 1: Develop the database system 1.1 Final Mock-up of the application 1.2 Queries to create database with results 26 1.3 Database maintenance features and system security 34 a Maintenance features 35 b System security 35 Task 2: Produce queries 37 2.1 Queries to INSERT data with illustrations of final result 37 2.2 Queries to UPDATE data with illustrations of final result 42 2.3 Queries to DELETE data with illustrations of final result 42 2.4 Queries to SELECT data with illustrations of final result 44 2.5 Advanced queries: Stored procedures, triggers, functions 47 a Stored Procedures 47 b Triggers 49 DML triggers 50 DDL triggers 52 c Functions 53 2.6 Evaluate the effectiveness of the database solution and improvements 54 a Effectiveness of database solution 54 b Improvements 56 Page of 86 D Task 3: Test the system 57 3.1 Test cases 57 a Test plan and test result 57 b Overall evaluation of testing part 61 3.2 Flowchart to show how the system works 61 a System flowchart 61 b Insert information flowchart 63 c Update information flowchart 64 d Delete information flowchart 65 3.3 Produce technical and user documentation 66 3.3.1 Produce technical 66 a Introduction 66 b ERD 66 3.3.2 User documentation 68 3.4 Evaluate any future improvements to ensure the continued effectiveness of the database system 77 E a Scalability 77 b Security 77 c Monitor performance 78 d Data backup 80 e User interface and usability 81 f Integration with other systems 81 Conclusion 86 Page of 86 Table of Figures Figure 1: Login interface 10 Figure 2: Register interface 11 Figure 3: Main layout 12 Figure 4: Menu of view option 13 Figure 5: View Customer List Layout 14 Figure 6: View Staff List Layout 15 Figure 7: View order list layout 16 Figure 8: View Product List Layout 17 Figure 9: Menu of add options 18 Figure 10: Add new Staff layout 19 Figure 11: Add New Customer Layout 20 Figure 12: Add new Order Layout 21 Figure 13: Add New Product Layout 22 Figure 14: Menu of Update options 23 Figure 15: Update Customer layout 24 Figure 16: Menu of Statistic options 25 Figure 17: Create Database of system 26 Figure 18: Create schemas of system 26 Figure 19: Create Brands table 26 Figure 20: Create Categories table 27 Figure 21: create Products table 27 Figure 22: Create Discounts table 28 Figure 23: Create Customers table 28 Figure 24: Create Staffs table 29 Figure 25: Create orders table 29 Figure 26: Create OrderItems table 30 Figure 27: Result of creating table 31 Figure 28: Table Brands 31 Figure 29: Table Categories 31 Page of 86 Figure 30: Table Products 31 Figure 31: Table Discounts 32 Figure 32: Table Customers 32 Figure 33: Table Staffs 33 Figure 34: Table Orders 33 Figure 35: Table OrderItems 33 Figure 36: Final diagram 34 Figure 37: Create user login of system and result 35 Figure 38: Queries to create roles Manager and Staff to access 36 Figure 39: Role access of Staff 36 Figure 40: Role access Manager 37 Figure 41: Queries to insert table Brands and result 38 Figure 42: Queries to insert table Categories and result 38 Figure 43: Queries to insert table Products and result 39 Figure 44: Queries to insert table Customer and result 39 Figure 45: Queries to insert table Discount and result 40 Figure 46: Queries to insert table Staffs and result 40 Figure 47: Queries to insert table Orders and result 41 Figure 48: Queries to insert table OrderItems and result 41 Figure 49: Data before update 42 Figure 50: Queries to update data 42 Figure 51: Data after update 42 Figure 52: Data before delete 43 Figure 53: Queries to delete 43 Figure 54: Data after delete 43 Figure 55: Queries to staff's information and result 44 Figure 56: Queries to Customer's information and result 44 Figure 57: Queries to Order's information and result 45 Figure 58: Queries to all Discount code and result 45 Figure 59: Queries to product's information and result 46 Page of 86 Figure 60: Queries to items of order and result 46 Figure 61: Queries top the good staffs last year and result 47 Figure 62: Queries to top most purchased customer last year and result 48 Figure 63: Queries to top most popular produtcs 49 Figure 64: Create table to contain change customer's information 50 Figure 65: DML trigger to monitor insert, update delete actions of Customer 51 Figure 66: Test and result of DML trigger 51 Figure 67: create table to contain change customer's information 52 Figure 68: create DDL trigger to display in ChangeLogs table 52 Figure 69: Test and result of DDL trigger 53 Figure 70: Create function fn_FindManageInfo to find the number of staffs each manager holds 54 Figure 71: Result function 54 Figure 72: Create index to improve system 56 Figure 73: Test index 57 Figure 74: Flowchart of system 62 Figure 75: Flowchart add information in tables 63 Figure 76: Flowchart update information in tables 64 Figure 77: Flowchart delete information in tables 65 Figure 78: ER diagram 67 Figure 79: User doc 01 68 Figure 80: User doc 02 69 Figure 81: User doc 03 70 Figure 82: User doc 04 71 Figure 83: User doc 05 72 Figure 84: User doc 06 73 Figure 85: User doc 07 74 Figure 86: User doc 08 75 Figure 87: User doc 08 76 Figure 88: Use firewall to security 77 Figure 89: SQL Server profiler 78 Page of 86 Figure 90: Connect SQL Server Profiler 79 Figure 91: Fill information trace 79 Figure 92: Event trace 80 Figure 93: Back up my data 80 Figure 94: Back up data of this system 81 Figure 95: Connect this database with visual studio 82 Figure 96: Connect data successfully 83 Figure 97: Query data product by C# 85 Figure 98: Result data of product in console application 86 Page of 86 A Introduction In this assignment, an online shop system database was implemented on SQL server using query language This database offers, permits changing, removing, and entering important information to manage the shop such as customer and staff personal information, login, product information, and discount code It is also equipped with data to assist administrators in managing and monitoring the store's status A comprehensive mock-up, as well as a relational database, has been developed and exhibited here Bugs are also fixed by testing Lastly, a technical database was created to assist users in utilizing this system based on the mock-up B Task 1: Develop the database system 1.1 Final Mock-up of the application In the first report, I thoroughly examined the FPT shop's users and features A comprehensive blueprint of the system was created based on the existing mock-up designs from the previous assignment In order to design and enhance the system, I created a user interface in this report that combines the system's functionalities The FPT shop system interfaces are as follows: • The first is the system's login interface, which includes a login and sign-up button: Page of 86 Figure 1: Login interface Page 10 of 86

Ngày đăng: 24/02/2024, 01:57