0% found this document useful (0 votes)
57 views26 pages

Asm1 DB

The document is an assignment front sheet for a BTEC Level 5 HND Diploma in Computing unit on database design and development. It includes information such as the student name and ID, class, assessor name, and a grading grid. The student declares that the assignment submission is their own work and they understand the consequences of plagiarism.

Uploaded by

Hoàng Ngủyên
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views26 pages

Asm1 DB

The document is an assignment front sheet for a BTEC Level 5 HND Diploma in Computing unit on database design and development. It includes information such as the student name and ID, class, assessor name, and a grading grid. The student declares that the assignment submission is their own work and they understand the consequences of plagiarism.

Uploaded by

Hoàng Ngủyên
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

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 Hoang Student ID GCH211244

Class GCH1102 Assessor name Do Hong Quan

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

P1 M1 D1
❒ Summative Feedback: ❒ Resubmission Feedback:

Grade: Assessor Signature: Date:


Internal Verifier’s Comments:

Signature & Date:


I. Introduction to Databases and Relational Database Management System

1.1. What is a Database?

A database is information that is set up for easy access, management, and updating. Computer databases
typically store aggregations of data records or files that contain information, such as sales transactions,
customer data, financials, and product information.

Databases are used for storing, maintaining, and accessing any sort of data. They collect information on
people, places, or things. That information is gathered in one place so that it can be observed and
analyzed. Databases can be thought of as an organized collection of information.

1.2. Types of Databases

1. Centralized Database
The information(data) is stored at a centralized location and users from different locations can access this
data. This type of database contains application procedures that help the users to access the data even
from a remote location.

Various kinds of authentication procedures are applied for the verification and validation of end users,
likewise, a registration number is provided by the application procedures which keeps track and records
of data usage. The local area office handles this thing(Samual,2020).
2. Distributed Database
Just opposite the centralized database concept, the distributed database has contributions from the
common database as well as the information captured by local computers also. The data is not at one
place and is distributed at various sites of an organization. These sites are connected to each other with
the help of communication links which helps them to access the distributed data easily.

You can imagine a distributed database as one in which various portions of a database are stored in
multiple different locations(physical) along with the application procedures which are replicated and
distributed among various points in a network.

There are two kinds of distributed databases, viz. homogenous and heterogeneous. The databases which
have the same underlying hardware and run over the same operating systems and application procedures
are known as homogeneous DDBs, for eg. All physical locations in a DDB. Whereas, the operating
systems, underlying hardware as well as application procedures can be different at various sites of a DDB
which is known as a heterogeneous DDB(Samual,2020).

3. Personal Database
Data is collected and stored on personal computers which is small and easily manageable. The data is
generally used by the same department of an organization and is accessed by a small group of
people(Samual,2020).
4. End User Database
The end user is usually not concerned about the transaction or operations done at various levels and is
only aware of the product which may be software or an application. Therefore, this is a shared database
that is specifically designed for the end user, just like different levels of managers. A summary of the
whole information is collected in this database(Samual,2020).

5. Commercial Database
These are the paid versions of huge databases designed uniquely for the users who want to access the
information for help. These databases are subject-specific, and one cannot afford to maintain such a piece
of huge information. Access to such databases is provided through commercial links(Samual,2020).

6.NoSQL Database
These are used for large sets of distributed data. There are some big data performance issues which are
effectively handled by relational databases, such kind of issues are easily managed by NoSQL databases.
There are very efficient in analyzing large-size unstructured data that may be stored at multiple virtual
servers of the cloud(Samual,2020).
7. Operational Database

Information related to the operations of an enterprise is stored inside this database. Functional lines like
marketing, employee relations, customer service, etc. require such kinds of databases.
8.Relational Databases
These databases are categorized by a set of tables where data gets fit into a pre-defined category. The
table consists of rows and columns where the column has an entry for data for a specific category and
rows contains instance for that data defined according to the category. The Structured Query Language
(SQL) is the standard user and application program interface for a relational database.

There are various simple operations that can be applied over the table which makes these databases easier
to extend, join two databases with a common relation and modify all existing applications(Samual,2020).

9.Cloud Databases
Now a day, data has been specifically getting stored over clouds also known as a virtual environment,
either in a hybrid cloud, public or private cloud. A cloud database is a database that has been optimized
or built for such a virtualized environment. There are various benefits of a cloud database, some of which
are the ability to pay for storage capacity and bandwidth on a per-user basis, and they provide scalability
on demand, along with high availability.

A cloud database also gives enterprises the opportunity to support business applications in a
software-as-a-service deployment(Samual,2020).
10. Object-Oriented Databases
An object-oriented database is a collection of object-oriented programming and relational database. There
are various items that are created using object-oriented programming languages like C++, Java which can
be stored in relational databases, but object-oriented databases are well-suited for those items.

An object-oriented database is organized around objects rather than actions, and data rather than logic.
For example, a multimedia record in a relational database can be a definable data object, as opposed to an
alphanumeric value(Samual,2020).

11. Graph Databases


The graph is a collection of nodes and edges where each node represents an entity and each edge
describes the relationship between entities. A graph-oriented database, or graph database, is a NoSQL
database that uses graph theory to store, map, and query relationships.

Graph databases are basically used for analyzing interconnections. For example, companies might use a
graph database to mine data about customers from social media(Samual,2020).
1.3. What is a RDBMS?

RDBMS stands for Relational Database Management System.

All modern database management systems like SQL, MS SQL Server, IBM DB2, ORACLE, My-SQL,
and Microsoft Access are based on RDBMS.

It is called Relational Database Management System (RDBMS) because it is based on the relational model
introduced by E.F. Codd.

1.4. Types of RDBMS

1. Oracle

Oracle database came into existence in the late 70s and has many versions available for use. It is
compatible with the cloud and is deployable on one or more servers.

Also, the logical data does not affect the physical data. We get an upgraded level of security as the
transactions are done in different sessions thus, avoiding any possibility of a clash.

Pros:

● Provides the latest innovations and features.


● Oracle DBMS tools are incredibly robust thus, capable of performing almost any
● possible task.

Cons:

● It is an expensive tool for smaller organizations.


● Requires a large number of regular hardware updates.

2. MySQL Database

One of the most popular databases for all the available technological requirements. It is freeware and thus
is ideal for both small and large-scale organizations.

MySQL provides us with the choice to configure the data types to accommodate any possible data we
have. Also, it is reliable and has no large resources required.

Pros:
● It is freeware thus cost-efficient.
● Provides a large number of functionalities.
● It supports various user interfaces for easy use.
● Compatible with other DBMS like Oracle and DB2.

Cons:

● It is a bit slow compared to other DBMS.


● There is no built-in support for OLAP.
● Consumer support is not available for the free version.

3. Microsoft SQL Server

This DBMS works on a cloud-based system or a local server.

Some of the major features include the tracing facility of any changes in the data. It also allows dynamic
data masking which helps in protecting the sensitive data stored.

Pros:

● This is a reliable and fast DBMS.


● Has the ability to adjust to available resources, hence is very resource-efficient.
● Provides easy visualizations for mobile devices.
● Compatible with all Microsoft products.

Cons:

● This DBMS is very expensive to use.


● Many times leads to hampered resources.
● Not compatible with importing and exporting data files.

4. PostgreSQL Database

One of the major free popular databases and is frequently used in web applications. It supports
deployment in various environments i.e. virtual, physical, and cloud-based environments.

The newer versions have support for large volumes of data. Security has also improved.

Pros:
● A scalable and adjustable DBMS.
● Provide built-in support for the JSON data.
● Provides plenty of predefined functions.
● It is available in various versions of user interfaces.

Cons:

● Proper documentation is not available.


● The configuration is very confusing and complex.
● Speed hampers due to batch operation of queries.

5. DB2

It is the DBMS that was found by IBM for their internal use and was later released for public use. One of
the most important and evident features is faster-skipping technology.

Data skipping helps in increasing the system speed and boosts the effective use of resources. It has added
disaster recovery options that increase reliability and compatibility.

Pros:

● Due to the high speed, the handling of enormous data becomes easier.
● Compatible with cloud, physical server, or both at the same time.
● Task automation is available as it provides the task scheduler.
● Provides proper error codes and exit codes which make debugging easier.

Cons:

● Expensive for small organizations or individuals.


● Making functional nodes or clusters demands third-party tools.
● Support is available for three years after that you need to pay for the support.
II. User and system requirements

2.1. Introduction of the problem

I work as a database developer for a significant IT consulting firm. Due to the increase in members and
the complexity of the work, growing organizations have contacted the company. The director is currently
having trouble with company management. To make managing the organizations easier, he made the
decision to create various types of systems. I have been given the duty of building a database for the
online cinema ticket booking system.

2.2. Analyze the requirements

Requirements for the database system:

-The cinema system is located in 7 major cities across the country, and each city has a maximum of 6
cinemas.

-Each cinema has a maximum of 8 rooms, and each room has a maximum of 8 rows of seats.

-The rows of seats are divided into 3 types, normal seats, vip seats, and couple seats. Each type of chair
will have a different price.

- About movies: each movie will be saved movie name, genre, duration, release date, and description

-Showtime must be arranged by film and by room. A day will have many movie time frames, each movie
will be shown continuously for 2 months.

-Need to save the following information of customers: name, phone number, email,...

-Invoice for each ticket booking must include full information such as theater name, room name, movie
name, number of seats, time, and total cost.

Requirements for the application:

For customer:

-Sign in, log out

-Searching movie

- Reservations

- Payment

- Recording payment

- Edit personal information


For administrator:

-Sign in, log out

-Add/ delete movie

-Arrange schedule

-Recording payment

-Manage customer’s information and status

After analyzing the requirements, I have a use-case diagram below:

Use-case for online booking movie tickets system


III. Design the relational database system

3.1. Conceptual Design


3.2. Logical Design

3.3. Normalization

Realized that the attribute number of seats in the room table could be counted with the count statement, so
I removed this attribute.
According to the logical design, the relationship between the Seat table and the Booking table is many to
many, so I used one more table is SeatReserved , to store all the booked seats.

Because a room can have multiple showtimes in a day, and a movie can also have multiple showtimes, I
separate the Schedule table. The Schedule table will store the show dates, and the Showtime table will
have the showtimes according to the specific hours of each movie and each room.
This is the final design after normalization:

3.4. Physical Design

I choose SQL Server.

SQL Server is a relational database management system (RDBMS) developed by Microsoft. It is primarily
designed and developed to compete with MySQL and Oracle databases. SQL Server supports ANSI SQL,
which is the standard SQL (Structured Query Language) language. However, SQL Server comes with its
own implementation of the SQL language, T-SQL (Transact-SQL).
T-SQL is a Microsoft propriety Language known as Transact-SQL. It provides further capabilities for
declaring variables, exception handling, stored procedures, etc.
SQL Server Management Studio (SSMS) is the main interface tool for SQL Server, and it supports both
32-bit and 64-bit environments.
-Details of each table:

City table:

Attribute Data type Data validation

PK City_id int UNIQUE

City_name char Not Null

Cinema table:

Attribute Data type Data validation

PK Cinema_id int UNIQUE

Cinema_name char Not Null

Address char Not Null

FK City_id int Not Null

Room table:

Attribute Data type Data validation

PK Room_id int UNIQUE

Room_name char Null

FK Cinema_id int Not Null

Seat table:

Attribute Data type Data validation

PK Seat_id int UNIQUE

Status_seat char Null

Type_seat char Not Null

Row_seat char Not Null


Number int Not Null

Price float Not Null

FK Room_id int Not Null

Movie table:

Attribute Data type Data validation

PK Movie_id int UNIQUE

Name_of_movie char Not Null

Genre_movie char Null

Length_movie char Null

Description_movie char Null

Format_movie char Null

Status_movie char Null

Release Date Null

Customer table:

Attribute Data type Data validation

PK Customer_id int UNIQUE

Customer_name char Not Null

Username char UNIQUE

Password char Not Null

Phone_number int UNIQUE

Email char Null


Schedule table:

Attribute Data type Data validation

PK Date_id int UNIQUE

Schedule_Date Date Not Null

Showtime table:

Attribute Data type Data validation

PK Showtime_id int UNIQUE

Showtime Time Null

FK Movie_id int Null

FK Room_id int Null

FK Date_id int Null

Booking table:

Attribute Data type Data validation

PK Booking_id int UNIQUE

FK Customer_id DateTime Not Null

FK Movie_id int Not Null

FK Room_id int Not Null

FK Date_id int Not Null

FK Showtime_id int Not Null

FK Cinema_id int Not Null


Seat reserved table:

Attribute Data type Data validation

PK Reservation_id int UNIQUE

FK Seat_id int Not Null

FK Booking_id int Not Null

IV. Wireframe Design

This is the interface for the user to be able to login


If customer don't have an account, you can register an account like the form below:
This is the main user interface. Customers can see movies and pick a movie.

After clicking “Book now”, customers can select the room and time to watch the movie they choose.
This is the design for customers to pick their seat:
After completing the seat selection, here is an invoice showing all the information about the movie name,
room, showtimes, seats and price:
This is the interface of the admin mode, with the functions of adding, editing, deleting and managing
customer lists:
REFERENCES:

B. Lutkevich (2021) database (DB) .Available at:

https://www.techtarget.com/searchdatamanagement/definition/database (Accessed 20 December 2022)

S.Sam(2020) Types of database.

Available at: https://www.tutorialspoint.com/Types-of-databases (Accessed 20 December 2022)

Data Flair. SQL – RDBMS Database System (Modern) | Features & Types. Available at:

https://data-flair.training/blogs/sql-rdbms-database/(Accessed 20 December 2022)

You might also like