Docsity
TOP

Database Design and Development (1622) - ASM 1, Assignments of Database Programming

Partial preview of the text

Download Database Design and Development (1622) - ASM 1 and more Assignments Database Programming in PDF only on Docsity!

Higher Nationals in Computing

Unit 04: Database Design and Development

ASSIGNMENT 1

Learner’s name: NGUYEN GIA HUY

ID: GCS

Class: GCS0905C

Subject code: 1622

Assessor name: PHAN MINH TAM

Assignment due: Assignment submitted:

ASSIGNMENT 1 FRONT SHEET Qualification BTEC 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 NGUYEN GIA HUY Student ID GCS Class GCS0905C Assessor name Phan Minh Tam 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 HUY Grading grid

P1 M1 D

Assignment Brief 1 (RQF)

Higher National Certificate/Diploma in Computing

Student Name/ID Number: NGUYEN GIA HUY / GCS Unit Number and Title: Unit 04: Database Design & Development Academic Year: 2022 Unit Assessor: Phan Minh Tam Assignment Title: Database design Issue Date: 18 Jan 2022 Submission Date: Internal Verifier Name: Date: Submission Format: Format: ● The submission is in the form of an individual written report. This should be written in a concise, formal business style using single spacing and font size 12. You are required to make use of headings, paragraphs and subsections as appropriate, and all work must be supported with research and referenced using the Harvard referencing system. Please also provide a bibliography using the Harvard referencing system. Submission ● Students are compulsory to submit the assignment in due date and in a way requested by the Tutor. ● The form of submission will be a soft copy posted on http://cms.greenwich.edu.vn/. ● Remember to convert the word file into PDF file before the submission on CMS. Note: ● The individual Assignment must be your own work, and not copied by or from another student. ● If you use ideas, quotes or data (such as diagrams) from books, journals or other sources, you must reference your sources, using the Harvard style. ● Make sure that you understand and follow the guidelines to avoid plagiarism. Failure to comply this requirement will result in a failed assignment.

Unit Learning Outcomes: LO1 Use an appropriate design tool to design a relational database system for a substantial problem Assignment Brief and Guidance: 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 1 (Assignment 1) Before you start the development process, your manager has asked you to produce a report for the CEO of FPT, containing:
  1. Clear statements of user and system requirements. The system must have at least 3 user roles, including business processes and statistical reports for FPT Shop managers.
  2. The design of the relational database system using appropriate design tools and techniques. It should contain at least four interrelated tables. You would prefer to produce a more detailed document, so you will produce a comprehensive design for a fully functional system which will include interface and output designs, 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.

Table of Contents

  • Unit 04: Database Design and Development ASSIGNMENT
  • Assignment Brief 1 (RQF)
    • Higher National Certificate/Diploma in Computing
  • at least four interrelated tables, with clear statements of user and system requirements. P1. Design a relational database system using appropriate design tools and techniques, containing
      1. Introduction to database
      • 1.1. What is the database?
      • 1.2. Types of database
        • 1.2.1. Object-oriented Databases
        • 1.2.2. Hierarchical Databases
        • 1.2.3. Network Databases
        • 1.2.4. NoSQL Database
        • 1.2.5. Relational Database
      1. Introduction to RDBMS
      • 2.1. What is the RDBMS?
      • 2.2. Popular RDBMSs:
        • 2.2.1. Oracle:
        • 2.2.2. Microsoft SQL Server:
        • 2.2.3. MySQL:
        • 2.2.4. PosgreSQL:
        • 2.2.5. Access:
      • 2.3. Select the specific RDBMS to apply to the given scenario:
      1. Database Design base on the scenario
      • 3.1. Analyse the requirements
      • 3.2. Logical Design
      • 3.3. Physical Design
      • 3.4. SQL code.
  • REFERENCES

P a g e | 1

ASSIGNMENT 1 ANSWERS

P1. Design a relational database system using appropriate design tools and techniques, containing

at least four interrelated tables, with clear statements of user and system requirements.

1. Introduction to database 1.1. What is the database? A database is an organized collection of structured information, or data, typically stored electronically in a computer system. A database is usually controlled by a database management system (DBMS). Together, the data and the DBMS, along with the applications that are associated with them, are referred to as a database system, often shortened to just databases. Data within the most common types of databases in operation today are typically modeled in rows and columns in a series of tables to make processing and data querying efficient. The data can then be easily accessed, managed, modified, updated, controlled, and organized. Most databases use structured query language (SQL1) for writing and querying data2. Most often, we will first need to collect the data that goes into a database.

P a g e | 3 1.2.3. Network Databases It is the database that typically follows the network data model. Here, the representation of data is in the form of nodes connected via links between them. Unlike the hierarchical database, it allows each record to have multiple children and parent nodes to form a generalized graph structure. 1.2.4. NoSQL Database A NoSQL originally referring to non SQL or non-relational is a database that provides a mechanism for storage and retrieval of data. This data is modeled in means other than the tabular relations used in relational databases.

P a g e | 4 A NoSQL database includes simplicity of design, simpler horizontal scaling to clusters of machines, and finer control over availability. The data structures used by NoSQL databases are different from those used by default in relational databases which makes some operations faster in NoSQL. The suitability of a given NoSQL database depends on the problem it should solve. Data structures used by NoSQL databases are sometimes also viewed as more flexible than relational database tables. 1.2.5. Relational Database Considered the most mature of all databases, these databases lead in the production line along with their management systems. In this database, every piece of information has a relationship with every other piece of information. This is on account of every data value in the database having a unique identity in the form of a record. Note that all data is tabulated in this model. Therefore, every row of data in the database is linked with another row using a primary key. Similarly, every table is linked with another table using a foreign key.

2. Introduction to RDBMS

P a g e | 6 2.2. Popular RDBMSs: 2.2.1. Oracle: Introductions: Oracle database is a relational database management system. It is also called OracleDB, or simply Oracle. It is produced and marketed by Oracle Corporation. It was created in 1977 by Lawrence Ellison and other engineers. It is one of the most popular relational database engines in the IT market for storing, organizing, and retrieving data. Oracle database was the first DB that was designed for enterprise grid computing and data warehousing. Enterprise grid computing provides the most flexible and cost-effective way to manage information and applications. It uses SQL queries as a language for interacting with the database. Features: Availability: High data availability is a prerequisite of real-time applications. The configuration of high performing computing environments is performed for providing all-time data availability. Availability of data is seen during planned or unplanned failures and downtimes. Performance and Scalability: The scalability of the Oracle database is enhanced with the features like Portability and Real Application Clustering. It is needed to control data consistency and concurrency in a multiuser database which is contemplated by Oracle. Security: Security should always be the topmost concern. There are exclusive mechanisms provided by Oracle to monitor and control data access and usage. You can easily prevent unauthorized access and allow distinct access to the users by implementing authorization and editing user actions. Backup and Recovery: Its layout is made in such a way that it is completely recoverable from all kinds of failures. If some failure occurs, the recovery of the database needs to

P a g e | 7 be done within no time for high availability. Affected parts of the data are getting recovered, while the unaffected parts of the data are still available. Advantage: ● Performance: Oracle has procedures and principles that help us to get high levels of database performance. ● PL/SQL: One of the greatest benefits of using the Oracle database is to support PL/SQL extension for procedural programming. ● Portability: The Oracle database can be ported on all different platforms than any of its competitors. 2.2.2. Microsoft SQL Server: Introductions: Microsoft SQL Server is a relational database management system (RDBMS) that supports a wide variety of transaction processing, business intelligence and analytics applications in corporate IT environments. Microsoft SQL Server is one of the three market-leading database technologies, along with Oracle Database and IBM's DB2. Like other RDBMS software, Microsoft SQL Server is built on top of SQL, a standardized programming language that database administrators (DBAs) and other IT professionals use to manage databases and query the data they contain. SQL Server is tied to Transact-SQL (T-SQL), an implementation of SQL from Microsoft that adds a set of proprietary programming extensions to the standard language. Features: Intelligence across all your data with Big Data Clusters. Break down data silos. Choice of language and platform. Run SQL Server anywhere. Industry-leading performance. #1 in performance. Most secured data platform.Unparalleled high availability. End-to-end mobile BI. SQL

P a g e | 9 threads. It can handle multiple CPUs if they are available. MySQL provides transactional and non- transactional storage engines. Advantage: Data Security. On-Demand Scalability. High Performance. Round-The-Clock Uptime. Comprehensive Transactional Support. Complete Workflow Control. Reduced Total Cost Of Ownership. 2.2.4. PosgreSQL: Introductions: PostgreSQL is an enterprise-class open source database management system. It supports both SQL and JSON for relational and non-relational queries for extensibility and SQL compliance. PostgreSQL supports advanced data types and performance optimization features, which are only available in expensive commercial databases, like Oracle and SQL Server. It is also known as Postgres. It is backed by an experienced community of developers who have made tremendous contributions to make it a highly reliable DBMS system. Features: ● Compatible with various platforms using all major languages and middleware. ● Helps developers to build applications. ● It offers a most sophisticated locking mechanism. ● Mature Server-Side Programming Functionality ● Support for multi-version concurrency control. Advantage:

P a g e | 10 ● To learn Postgres, you don’t need much training as it's easy to use. ● Low maintenance and administration for both embedded and enterprise use of PostgreSQL ● PostgreSQL can run dynamic websites and web apps as a LAMP stack option. ● PostgreSQL’s write-ahead logging makes it a highly fault-tolerant database 2.2.5. Access: Introductions: Access is a database management system or a relational database management system with the ability to help us rapidly develop solutions for storing and managing information. Features: Ideal for individual users and smaller teams. Easier than a client-server database to understand and use. Import and export to other Microsoft Office and other applications. Ready templates for regular users to create and publish data. Allows building and publishing Web databases effortlessly. A user friendly feature ‘Tell Me’ for assistance. Allows developers to create custom solutions using VBA code Hide/Show option for Ribbon. Allows users to Report View Eliminates Extra Reports. Allows output Reports in PDF format. Advantage: Widely Popular. Easy to Install and Use. Easy to Integrate. Large Amounts of Data. Compatibility with SQL. Cost-Effective. Easy to Share Data. Automate Actions. Ready-to-use Templates and Wizards. Import & Export. Upgrade capabilities. Analysis of Databases.

P a g e | 12 3.2. Logical Design Explanation: Database has 5 tables, content in each table included:

  • CATEGORY: Category ID, Category Name.
  • PRODUCT: Product ID, Product Name, Name User, Product Detail, Product Image, Product Intro, Product ID.
  • PRODUCER: Producer ID, Producer Name, Producer Address, Producer Contact, Producer Product Information, Producer Phone.
  • COMMENT: Comment ID, Comment Vote, Name User, Feedback, Email User, User ID, Product ID.
  • USER: User ID, User Name, User Address, User Email, User Phone. 3.3. Physical Design

P a g e | 13 Explanation: Table name Fields Data type Constraint Description Category categoryID nvarchar(10) not null primary key categoryName nvarchar(50) not null Producer ProducerId nvarchar(10) not null primary key ProducerName nvarchar(50) not null ProducerAddress nvarchar(100) not null ProducerContact int not null Product ProductId nvarchar(10) not null primary key ProductName nvarchar(50) not null