Docsity

Assignment 1 guidance, Summaries of Database Programming

Toggle sidebar
bg1
Assignment 1 Guidance
Task 1 - Statements of user and system requirements (P1)
In this part, you must present users’ requirements of your system. To make it simpler to
understand for the CEO, you can use the format of User Story below to describe
requirements
As a < type of user >, I want < some goal > so that < some reason >.
The system must have at least 4 user roles, including business processes for FPT Shop
managers, directors board and customers.
The system must include CRUD actions (Create/ Read/ Update/Delete) and at least 5
advanced statistical action
(Word limit: 300 – 500 words)
Task 2 – Design the relational database system (P1 – M1)
Next, you will design the relational database system using appropriate design tools and
techniques. It should contain at least four interrelated tables with detailed explanation for
the design and each table. You will assess whether the database is normalized and adapt the
users’ requirements. If the database is not normalized, you have to a clear reason to justify
it. You will have to include the final database design with clear explanation.
You would prefer to produce a more detailed document, so you will produce a
comprehensive design for a fully functional system which will include Wireframes, data
validations and cover data normalization.
Your manager would like on the report your assessment of the effectiveness of the design in
relation to user and system requirements.
(Word limit: 1000 – 1500 words)
Report Structure
Chapter 1 - Statements of user and system requirements
1.1 Overview about the Problem
- Giới thiệu chung về hệ thống (CSDL) mà chúng ta sắp thiết kế. Cụ thể là cần XD
CSDL cho FPT Shop
- Phân tích hiện trạng xem hiện nay họ quản lý dữ liệu như thế nào (phân tích các
thông tin thu thập được như các form, bill,…);
1
pf3
pf4
pf5

Partial preview of the text

Download Assignment 1 guidance and more Summaries Database Programming in PDF only on Docsity!

Assignment 1 Guidance Task 1 - Statements of user and system requirements (P1) In this part, you must present users’ requirements of your system. To make it simpler to understand for the CEO, you can use the format of User Story below to describe requirements As a < type of user >, I want < some goal > so that < some reason >. The system must have at least 4 user roles, including business processes for FPT Shop managers, directors board and customers. The system must include CRUD actions (Create/ Read/ Update/Delete) and at least 5 advanced statistical action (Word limit: 300 – 500 words) Task 2 – Design the relational database system (P1 – M1) Next, you will design the relational database system using appropriate design tools and techniques. It should contain at least four interrelated tables with detailed explanation for the design and each table. You will assess whether the database is normalized and adapt the users’ requirements. If the database is not normalized, you have to a clear reason to justify it. You will have to include the final database design with clear explanation. You would prefer to produce a more detailed document, so you will produce a comprehensive design for a fully functional system which will include Wireframes, data validations and cover data normalization. Your manager would like on the report your assessment of the effectiveness of the design in relation to user and system requirements. ( Word limit: 1000 – 1500 words) Report Structure Chapter 1 - Statements of user and system requirements 1.1 Overview about the Problem

  • Giới thiệu chung về hệ thống (CSDL) mà chúng ta sắp thiết kế. Cụ thể là cần XD CSDL cho FPT Shop
  • Phân tích hiện trạng xem hiện nay họ quản lý dữ liệu như thế nào (phân tích các thông tin thu thập được như các form, bill,…);
  • Đánh giá hệ thống hiện tại (Giả sử là chưa chuẩn). Đề xuất giải pháp mới (vì sao phải sử dụng csdl của mình đề xuất) As a client/customer, I want to view the detail products/items so that I can select that product. As a client/customer, I want to order products/items so that I can buy that product. As a client/customer, I want to check my products/items so that I can make sure that product is mine. …… Tự liệt kê (List such as follow order, log in, log out,……) As a staff, I wanna input the products’ data/information so that I can manage the products. As a staff, I wanna alter/modify products’ data so that I can update the products. As a staff, I wanna approve the customers’ order so that the orders can be delivered. …… Tự liệt kê (List such as follow order, view feedbacks,.……) As a manager, I wanna manage the staff so that I can supervise the staff. As a manager, I wanna view the list of products so that I can manage the products. As a manager, I wanna view the daily/monthly/weekly revenue so that I can manage the income/money of my shop. As a manager, I wanna check staff’s attendance so that I can pay their salary. …… Tự liệt kê  So, I can define all tables what I need. They are
  1. Products (MaSP, Ten, Gia, SoLuong, …)
  2. Order (MaSP, MaKH, NgayDatHang, …)
  3. Customer (MaKH, TenKH, Sdt, DiaChi, …)
  4. Staff (MaNV, TenNV, Sdt, DiaChi, …) 1.2 Requirements of the application
  • Trình bày các yêu cầu của FPT Shop về CSDL cần xây dựng: ví dụ Lưu trữ dữ liệu tất cả các cửa hàng Lưu trữ hàng hóa, khách hành, đơn hàng,… Truy xuất dữ liệu khi có yêu cầu Thống kê dữ liệu theo định kỳ Backup dữ liệu, ….

Hình xyz trình bày biểu đồ thực thể qquna hệ của hệ thống FPTSHOP qua hình xyz chúng ta thấy có các mối quan hệ sau:

  • Thực thể customer có quan hệ 1 – nhiều với order bởi vì một khách hàng có thể thực hiện nhiều đơn hàng. Ngược lại 1 đơn hàng cụ thể của 1 khách hàng
  • Một staff phê duyệt nhiều đơn hàng nhưng 1 đơn hàng cụ thể chỉ cho 1 staff phê duyệt

M1 Produce a comprehensive design for a fully functional system which includes interface and output designs, data validations and data normalisation. Có đầy đủ các ràng buộc:

  • View nhập dữ liệu (includes interface = mỗi view trên 1 bảng)
  • Truy vấn dữ liệu (output designs = select (chụp kết quả chạy lệnh select bỏ vào))
  • Ràng buộc check cho các cột kiểu số (data validations = Check (Price>0))
  • Chuẩn hoá 2.3 Review whether the database is normalized
  • Chuẩn hoá: Từ các thông tin thu thập được. Các bước chuẩn hoá phải trình bày trong bảng dạng như sau: UNF 1NF 2NF 3NF 2.4 Data validation Mô tả các ràng buộc của CSDL: ràng buộc khóa chính, khóa ngoại, ràng buộc check (ví dụ số lượng, đơn giá >0, ngày đặt hàng >= ngày hiện tại,…)

2.5 Wireframe of the application

  • Giới thiệu CSDL này dung để làm gì (lưu trữ thông tin gì), có thể được sử dụng ở đâu? Có những bảng nào?
  • Mô tả chi tiết các bảng Ví dụ: Bảng Products: this table is used to store all information of products. It has serveral columns such as: productID, productName, Price, Quantity… Among these, productID is primary key. The column productName must be not null and price and quanity must be bigger than zero (>0). The detail of table product is shown as follow: Column name Data Tye Allow null Contraint ProductID Nvarchar(100) no PK ProductName Nvarchar(100) No Unique Price int no Check (Price>0) Quantity int no Check (quantity>0) Làm tương tự cho các bảng còn lại
  • Tạo CSDL và các bảng Viết các lệnh tạo CSDL, bảng Tạo Database Diagram (Chụp ảnh Diagram bỏ vào) Nhập dữ liệu (Sample data) sau đó chụp ảnh bảng có dữ liệu
  • Tạo các view cho phép người dùng nhập/ truy xuất dữ liệu/ cập nhật/ xoá
  • Tự đặt ra một vài trường hợp sử dụng để tạo view phù hợp ví dụ như: Thống kê số lượng hang hoá bán được theo ngày/tuần/tháng; báo cáo doanh thu,….
  • Chụp ảnh toàn bộ các kết quả truy vấn để làm evidences
  • D1 Assess the effectiveness of the design in relation to user and system requirements: Đánh giá tính hiệu quả của bản thiết kế của mình đối với yêu cầu của người dùng csdl này (FPT shop) Không tồn tại nguyên tắc nhiều nhiều n-n => phải có bảng ở giữa