Docsity

ASM 2_1622_Database Design & Development (PASS), Slides of Database Programming

Partial preview of the text

Download ASM 2_1622_Database Design & Development (PASS) and more Slides Database Programming in PDF only on Docsity!

Higher Nationals in Computing

ASSIGNMENT 2

Learner’s name: Dong Sy Nhat Thanh

ID: GCS

Class: GCS1003A

Subject code: 162 2

Assessor name: Dang Nguyen

Assignment due: Assignment submitted

❒ Summative Feedback: ❒ Resubmission Feedback:

Grade: Assessor Signature: Date:
Signature & Date:

comply this requirement will result in a failed assignment.

Unit Learning Outcomes: LO2 Develop a fully functional relational database system, based on an existing system design. LO3 Test the system against user and system requirements. LO4 Produce technical and user documentation Assignment Brief and Guidance: Assignment scenario You are employed as a Database Developer for a large IT consultancy company. The company has been approached by FPT Shop which is expanding due to the growth of the number of stores. FPT Shop is currently facing difficulties in dealing with managing the database from all shops on over country. It decided to develop a new database so that: users can register with their phone numbers as IDs and order or rate, comment for their bought devices, shop managers can take care for their stores and director board can view all data from all shops. You are tasked to select one of those systems to develop database for FPT Shop. Your tasks are to:  Work with FPT Shop to find out about current requirements for each system  Analyse the requirements and produce clear statements of user and system requirements.  Design a relational database system using appropriate design tools and techniques  Develop a fully functional relational database system, based on an existing system design.

 Test the system against user and system requirements.
 Produce technical and user documentation

Part 2 (Assignment 2) Once the designs have been accepted by your manager you have been asked to: Develop the database system using evidence of user interface, output and data validations and querying across multiple tables. You want to include more than just the basics so you will implement a fully functional database system which will include system security and database maintenance features. You have decided to implement a query language into the relational database system. The developed system will be demonstrated to your manager. Your manager has asked you to include in the report: (1) Assessing whether meaningful data has been extracted through the use of query tools to produce appropriate management information. (2) Evaluating the effectiveness of the database solution in relation to user and system requirements, and suggest improvements. (3) Once the system has been developed, you will test the system and your manager will complete a witness statement indicating how your tests are performing against user and system requirements. (4) You will produce a brief report assessing the effectiveness of the testing, including an explanation of the choice of test data used. (5) Lastly you will produce technical and user documentation which will be given to the company.

You want to provide some graphical representations for ease of reference in the technical guide, so you have decided to produce a technical and user documentation for a fully functional system, including diagrams showing movement of data through the system, and flowcharts describing how the system works.

Table of contents

  • Task 1 - Develop the database system (P2 – P3).......................................................................................
    1. Table diagram........................................................................................................................................
    1. Graphical user interface........................................................................................................................
  • Task 2 – Produce queries (P3)...................................................................................................................
    1. Querying data........................................................................................................................................
    • 1.1. Select..........................................................................................................................................
    • 1.2. Select + where............................................................................................................................
    • 1.3. Select + group by, having..........................................................................................................
    • 1.4. Select + join..............................................................................................................................
    1. Insert data..........................................................................................................................................
    • 2.1. Insert User................................................................................................................................
    • 2.2. Insert Producer.........................................................................................................................
    • 2.3. Insert Director...........................................................................................................................
    • 2.4. Insert Product...........................................................................................................................
    • 2.5. Insert Feedback........................................................................................................................
    1. Update data........................................................................................................................................
    1. Delete data.........................................................................................................................................
    1. Create view........................................................................................................................................
    1. Create store procedure......................................................................................................................
    1. Create triggers....................................................................................................................................
  • Task 3 – Test the system (P4)..................................................................................................................
  • P5. Produce technical and user documentation:.....................................................................................

Task 1 - Develop the database system (P2 – P3)

1. Table diagram

Figure 1: Physical table

2. Graphical user interface
Director interface design

Figure 2: Director interface design

User interface design

Figure 5: User interface design

Feedback interfaces design

Figure 6: Feedback interfaces design

Task 2 – Produce queries (P3)

1. Querying data
1.1. Select
SELECT in SQL refers to retrieving a set of result records from one or more tables. Data
manipulation languages are the most prevalent usage of commands. It is also used to obtain data
from one or more database tables.

Figure 7: Select

1.2. Select + where
WHERE in SQL Server is used to filter SELECT query results. In my essay, I incorporated extra
keywords such as AND and OR to compare the command lines.
Select + join
In SQL Server, JOIN is used to retrieve data from many tables (Transact-SQL). It happens when two
or more tables are connected in a SQL operation.

Figure 10: Select + join

Insert Product

Figure 14: Insert Product

2.5. Insert Feedback

Figure 15: Insert Feedback

3. Update data
In SQL Server, the UPDATE statement is used to update existing
records in a SQL Server database table. The following words
demonstrate how I modify several columns in my database's tables.
I update the value of [changed column] to [changed value]. Where
[column is condition] = [condition value].

Figure 16: Update data

4. Delete data