Assignment Report
Assignment Report
Table of Contents
Introduction...........................................................................................3
About Databases....................................................................................3
What is a Database?................................................................................................ 3
Why do we use it?................................................................................................... 3
Why is it important?................................................................................................ 4
Database Design....................................................................................4
Requirement Analysis.............................................................................5
Importance of Requirement Analysis.......................................................................5
Conceptual Design.................................................................................6
What is the process?............................................................................................... 6
Logical Design.......................................................................................8
What is the process?............................................................................................... 9
Normalization.......................................................................................................... 9
Importance of Logical Design................................................................................ 11
Physical Design....................................................................................11
What is the process?............................................................................................. 11
Importance of Physical Design.............................................................................. 12
Implementation....................................................................................19
User Guide............................................................................................................. 19
Effectiveness of Database Design..........................................................22
Conclusion...........................................................................................22
References...........................................................................................23
2
HND - 60 Aung Khin Sint
Introduction
My name is Aung Khin Sint. I work as a database developer for a large IT
Consultancy Company. The company accepted a commission by a small retail business
called “Little Baby Shop”. The commission requires the company to create software to
help with their business. The project manager tasked me with the database software. The
business owner told us that they have had a database before. It was designed by a college
student 5 years ago; they were okay with the amateur database that he designed for them
since they were a small business. But since then, the business has started to grow rapidly.
Their old database has started to show some of its flaws. Therefore, they requested a new
up-to-date database that contains newer technology and newer systems to help their rapidly
growing business. Before I get to explaining my process, it is important to understand what a
database is and why its so crucial to a business.
About Databases
What is a Database?
A database is a systematic collection of information or data that is usually saved
electronically in a computer system. A database management system (DBMS) is typically
required to manage a database. Data in databases is often structured in rows and columns
in a series of tables to make processing and data querying efficient. The data may then be
readily accessed, managed, amended, updated, controlled, and arranged. Most databases
write and use query data using structured query language (SQL).
3
HND - 60 Aung Khin Sint
Why is it important?
A database is an important part of a business for a multitude of reasons such as:
• Scalability: When businesses grow and change, they generally collect a lot more
data. Databases are built to help with this growing process, allowing companies to
grow their data store and working skills successfully. This freedom helps companies
change to changing market situations and user needs while still keeping functionality
and speed.
• Data security: Databases have different tools and ways that help keep data
security. These involve validation rules, limits, and transaction management that
cooperate to ensure the truth, reliability, and consistency of information over time.
Being constant is really important today because data-driven insights can greatly
affect business plans, how we connect with customers, and the ease of processes
overall.
• Decision-Making: Databases help build logical skills that are really important for
making good decisions in businesses. Databases let users pull out useful insights that
can help businesses measure trends and spot patterns, allowing them to make data-
driven choices that match with their goals. This not only helps business performance,
but it also supports creativity and success in the market.
• Backup and Recovery: Databases help keep important information safe, which is
super important for businesses nowadays. These systems make copies of data,
ensuring that information is saved quickly and correctly in the event of unexpected
loss, corruption, or unforeseen disasters. By adopting such robust backup strategies,
businesses can lessen the risk of working downtime or data loss, both of which can
have significant financial and social effects.
Database Design
Database Design can be defined as a set of procedures or collection of tasks involving
various steps taken to implement a database. It helps you get the right information when
you need it. When creating a database, having a well-structured database design is
important. A poorly designed database can lead to numerous problems such as slower
performance, scalability issues, data inconsistency, security risks, and may need increased
maintenance costs and time. To create a good database design, we need to break down the
steps of designing a database. There are multiple stages to database design:
Requirement Analysis
Logical Design
4
HND - 60 Aung Khin Sint
Physical Design
Implementation
Testing
Requirement Analysis
The initial step in database design is requirement analysis, which includes gathering
and studying needs. The goal is to examine the client's wants and expectations to properly
plan and implement solutions. This is the longest and most important step. If the research is
not done properly, the entire database design may need to be rebuilt, resulting in higher
development costs. A competent requirement analysis requires careful study and analysis of
the client's demands, as well as a written report outlining the key requirements.
5
HND - 60 Aung Khin Sint
Conceptual Design
Conceptual design is the process of finding important data items, connections, and
limitations in a data model. The conceptual design stage is the second step in database
design, preceding the logical and physical design stages. The main goal of conceptual
design is to build a high-level data model that fits business requirements while also giving a
complete understanding of the data items, connections, and limits involved. This data model
is the ground for mental and physical planning methods.
Identify the entities and their attributes − Entities are objects or concepts that
exist in the real world and can be distinguished from each other. Attributes are the
properties or characteristics of the entities. The first objective of conceptual database
design is to identify the entities and their attributes that are relevant to the
organization's business requirements.
Establish the constraints − Constraints are the rules that govern the relationships
between entities. The third objective of conceptual database design is to establish
the constraints between entities, which ensure data consistency and integrity.
6
HND - 60 Aung Khin Sint
Here’s my rendition of the conceptual design for ‘Little Baby Shop’. In this diagram there are
a total of six different entities. Each entity has its own attributes, Attributes are the defining
characteristics of the entities. Here are all the entities and their attributes:
Some attributes can hold multiple values at the same time. These are referred to as
multivalued attributes; some of which are in my ERD such as:
7
HND - 60 Aung Khin Sint
Each entity is connected to each other with a relationship. There are three types of linkage
in relationships:
One-to-One relationship: When one entity can be uniquely associated with another
entity.
One-to-Many relationship: When one entity can be associated with multiple
instances another entity (Example: Customer-Order)
Many-to-Many relationship: When an entity can be associated with multiple
instances another entity and vice versa (Example: Order-Item)
According to the model, a customer can place several orders. An order can contain many
items, and one item can appear in multiple orders. Each order is accepted by a staff
member, although the same staff member can accept many orders. Each staff member is
allocated to a certain branch.
After evaluation, we can observe that this ERD is well-structured, providing a simple view
into the structure of the database. This aids in data management by fostering smooth
contact between consumers, orders, employees, and items in the company without causing
any confusion during the process.
Logical Design
The third phase in database design is Logical Design. Logical design is the process of
transforming a conceptual model into a logical schema or model that structures data by
defining tables, fields, the primary and foreign keys, and relationships.
8
HND - 60 Aung Khin Sint
Normalization
Normalization refers to the process of structuring data in a database.
It is used to reduce the redundancy of a relationship or group of connections. It is also used
to remove unwanted traits such as Insertion, Update, and Deletion Anomalies.
Normalization separates the larger table into smaller ones and connects them through
relationships. The normal forms are used to eliminate data redundancy in the database
table. There are three normal forms in normalization. They are:
First Normal Form (1NF)- Remove repeated groups on individual tables. Make a
separate table for each collection of related data. Use a primary key to identify each
collection of linked data.
Second Normal Form (2NF)- Create distinct tables for collections of values that are
common to several entries. Connect these tables with a foreign key.
Third Normal Form (3NF)- Eliminate fields that don't depend on the primary key.
Let’s examine why each form is required to apply to your logical design. We can start with
the first normal form; the first normal form needs each column to hold an atomic/unique
value. This removes repeated values and lowers possible mistakes, making it easier to query
and handle data. The second normal form follows the first, needing all non-key attributes to
be reliant on the primary key. This stops attributes from being loosely or wrongly paired with
parts of the primary key, which could cause data integrity problems. The third normal form
demands that a non-key attribute be dependent solely on the primary key. If a non-key
attribute depends on another non-key attribute, 3NF moves such attributes to different
tables. This means that non-key attributes are only based on the primary.
My rendition of normalization follows the same principles as mentioned above. This ensures
an efficient database structure that maintains integrity, minimizes redundancy, and
enhances performance.
9
HND - 60 Aung Khin Sint
Order
Order No(PK) CustomerID(FK) Staff_ID(FK) Branch_ID(FK) OrderDate SubTotal Discount% Tax Delivery Total
LBS-00023 S-005 IDN-003 LBB-03 15/10/2024 760000 45600 15200 0 729600
OrderDetails Staff
Composite PrimaryKey Staff_ID(PK) StaffName
Order_No(FK) Item_ID(FK) Qty Amount IDN-003 Kyu Kyu
LBS-00023 LB-C45 15 105000
LBS-00023 LB-C46 20 460000 Branch
LBS-00023 LB-C93 1 45000 Branch_ID(PK) BranchName StoreAddress ContactNumber ContactEmail
LBS-00023 LB-C22 2 150000 LBB-03 Mingalardon Branch No12, Mingalardon, Yangon 01-223344 [email protected]
Item
Item_ID(PK) Description Age UnitPrice Customer
LB-C45 MoLo Pink Dress 2 Years 7000 CustomerID(PK) CustomerName Phone Email Address
No20(A), AungChan Thar,
LB-C46 MoLo Blue Dress 23000 S-005 Aye Thiri 09-5401244 [email protected]
4 Years Mandalay
LB-C93 BabyCar Seat 3 Years 45000
LB-C22 BabyStrollers 75000
Order OrderDetails
1 M
1 1
One Many
OrderDetails Item
1 1
M 1
Many One
Order Customer
1 1
M 1
Many One
Order Staff
1 1
M 1
Many One
Order Branch
1 1
M 1
Many One
• Establishes a Clear Data Structure- Logical design offers a structured basis for
data by describing entities, characteristics, and connections in an organized and
consistent way. This style makes data easy to store, access, and control inside the
system.
• Ensures Data Integrity and Accuracy- Logical design finds key connections and
dependencies among data, helping to apply limits that keep data accuracy and
10
HND - 60 Aung Khin Sint
consistency across the system. The careful design of tables and connections ensures
that the system works with reliable, correct data.
• Reduces Data Redundancy and Optimizes Storage- A well-designed logical
model removes redundancy by organizing data and ensures that the data is only
stored in one place, avoiding any unnecessary duplicates. This improves storage
effectiveness and lowers the chance of errors.
• Serves as a Blueprint for Physical Design- Logical design provides a basis that
guides the physical design, where implementation details such as data types and
storage settings are defined. A well-defined logical design makes the shift to physical
design more efficient and effective.
• Facilitates Future Scalability and Maintenance- Logical design considers current
and future data needs, making it easier to scale the database as the company grows.
It also improves upkeep and debugging because the data format is well-organized
and easy to navigate.
Physical Design
Physical Design is the last step of the database design process. Physical Design
defines the actual database architecture, based on the logical model, to be implemented on
a specific database management system. This includes how the data in each column must
be stored, what constraints are applied, and the purpose of the data stored in the column.
Optimizes Data Storage and Retrieval- Physical design involves strategies for
data storage, file organization, and indexing, which enhance retrieval speed and
efficiency. Well-planned indexing reduces query time and saves disk space, crucial for
large applications.
11
HND - 60 Aung Khin Sint
Ensures High Performance and Scalability- By accounting for data volume and
access frequency, physical design allows for performance optimization. Techniques
like partitioning and data distribution help manage higher loads and scale as data
grows.
Supports Security and Data Integrity- Security measures such as access controls
and encryption are established during physical design, protecting sensitive data. It
also sets constraints and triggers to maintain data integrity and prevent corruption.
Enables Efficient Query Processing- Physical design enhances query speed
through indexing, materialized views, and caching, leading to improved user
experience and application performance.
Allows Flexibility for Future Changes- It considers current and future
requirements, facilitating easier adaptability to changing data volumes or access
patterns without major redesigns. Modular design approaches help in system
upgrades.
Facilitates Backup and Recovery- Establishing a reliable backup and recovery
strategy is integral to physical design, minimizing data loss and downtime through
defined storage areas, backups, and transaction logs.
Enhances Data Transfer and Communication Efficiency- Physical design
optimizes data transfer between the database and applications, addressing network
constraints and minimizing latency through strategies like data denormalization.
Ensures Compatibility with the Chosen DBMS- It aligns the logical design with
the specific features and limitations of the selected DBMS, maximizing efficiency and
leveraging the system's strengths.
My rendition of Physical Design reflects the benefits mentioned above. Having such an
effective physical design improves the performance of the database system under heavy
operating loads and ensures speedy data retrieval.
Physical Design
‘Order’ Table
Null or
Column Constrain
Data Type Not Description
Name t
Null
12
HND - 60 Aung Khin Sint
Staff_ID VARCHAR (7) NOT Foreign Key Staff ID will be stored in this
column.
NULL Check
Foreign key constraint is
applied to link ‘Staff_ID’
from the ‘Staff’ table to the
‘Order’ table.
Format is IDN-001. Check
constraint is applied to this
column. Check constraint is
‘IDN-[0-9] [0-9] [0-9]’.
13
HND - 60 Aung Khin Sint
14
HND - 60 Aung Khin Sint
is 1500.
If ‘SubTotal’ column >
500,000 then charge is 0.
‘Order_Details’ table
Column Null or
Data Type Constraint Description
Name Not Null
Order_No. VARCHAR (9) NOT Foreign Key Order No. will be stored in
this column.
NULL Check
Foreign key constraint is
applied to link ‘Order_No’
from the ‘Order’ table to
the ‘Order_Details’ table.
Format is LBS-00001.
Check constraint is applied
to this column. Check
constraint is ‘LBS-[0-9] [0-
9] [0-9] [0-9] [0-9]’.
15
HND - 60 Aung Khin Sint
‘Item’ table
Column Null or
Data Type Constraint Description
Name Not Null
‘Staff’ table
Column Null or
Data Type Constraint Description
Name Not Null
16
HND - 60 Aung Khin Sint
‘Branch’ table
Column Null or
Data Type Constraint Description
Name Not Null
17
HND - 60 Aung Khin Sint
‘Customer’ table
Column Null or
Data Type Constraint Description
Name Not Null
18
HND - 60 Aung Khin Sint
Implementation
User Guide
To translate the design concepts into a working database, we need reliable software to
build the database on. There are various great selections to choose from, such as MySQL,
SQLite, and Microsoft SQL server. After great evaluation, Microsoft SQL server is the perfect
software for building a database for small retail businesses such as this one. Some reasons
include:
Low costs
User-friendly
Freedom of customization
The latest version, Microsoft SQL server 2022, is recommended as it’s always the safest
option. Having up-to-date software provides many benefits such as having quality-of-life
features that make managing a database more convenient. There’re many other reasons
such as:
Before we install the software, we first need to check if we have a reliable operating system
and a powerful enough computer for the database to run on. Any operating system is
compatible and optimized for in Microsoft SQL server. However, it is recommended to use
either Windows or macOS for smaller business such as this. As for specification
requirements, Microsoft SQL server needs:
Minimum requirements
19
HND - 60 Aung Khin Sint
Recommended requirements
Next, run the .exe file and a pop-up will show. Choose the Basic installation type and accept
the terms and conditions next choose the file location and install the file.
20
HND - 60 Aung Khin Sint
Once the installation is successful, click Install SSMS to install the Server Manager.
For the database to function properly, we should build the tables in an order based on
dependencies between tables, starting with tables that don’t have any foreign key
dependencies. This ensures that there won’t be any errors while building tables that
reference other tables. Here’s the recommended order for building the tables in your
database:
By building the tables following this order, each table can reference the necessary foreign
keys without any errors. Once all the tables have been created, the database has essentially
been finished.
21
HND - 60 Aung Khin Sint
performance. Physical design helps with faster queries and data retrievals. Logical data
model and physical design takes account for scalability and data growth ensuring smooth
expansion for the business. By testing these requirements with appropriate methods, we can
ensure that the database has met the business’s requirements.
Conclusion
The current database design intended for ‘Little Baby Shop’ has satisfied the
requirements for a small retail business. The database is designed methodically, with
structured tables for items, customers, orders, and inventories, which improves data
administration and makes essential business information more accessible. This architectural
style encourages smooth transaction processing, enables effective inventory management,
and provides a simple system for tracking client orders. The installation of this database will
lay a solid platform for everyday operations, improve managerial practices, and greatly
contribute to the business’s future growth. This development is will be of great
improvements for the ‘Little Baby Shop’ business.
22
HND - 60 Aung Khin Sint
References
Anand, A. (no date) Importance of database design in DBMS, Analytics Steps. Available at:
https://www.analyticssteps.com/blogs/importance-database-design-dbms (Accessed: 09
November 2024).
23