BITY3 - OL - Unit20 - ADBMS - July2023 - Sem2 - Task1 - Report - HussainRiyaz - 5201

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

Maldives Business School Cover Page

ASSESSMENT BRIEF
Bachelor’s Degree Year 3 - IT
The student must fill the relevant parts of the following table.
Student Last Student Task Date
Student First Name Name ID No. submitted Semester
Hussain Riyaz 5201 1 23/09/2023 July 2023
Statement of authenticity
I, the above named student, hereby confirm that this assignment is my own work and not copied or
plagiarized. It has not previously been submitted as part of any assessment. All the sources, from which
information has been obtained for this assignment, have been referenced in the Harvard format. I further
confirm that I have read and understood the Maldives Business School rules and regulations about
plagiarism and copying and agree to be bound by them.

Assignment summary information


Unit Unit 20 Advanced Database Management Systems Modality OL

Specialization Core
Assignment type This is an individual assignment.
Tasks Submit on Do on
Task 1: Report: LO1, LO2 23rd -29th September 2023 NA
Task 2: Examination: LO3, LO4. NA 18th-26th November 2023
An extension must be applied for in writing by individual students and will only be
Extensions
granted for valid reasons. No extensions allowed for examination.
Late Late submissions will be marked for all grades but will incur a fine of MVR 250 per task.
submissions (Assignment & Exam both)
Each report resubmission will be charged MVR 100 & re-sit/retake for examination
Resubmissions
will be charged MVR 250.
Assessor(s) Dr. Saurabh Internal Verifier Prof. Sandeep Singh Sikerwar

Assessor(s) please fill the table below AFTER the evaluation.


Assessment criteria Task Maximum Marks Marks Obtained IV Comments
1.1 1 12.5
1.2 1 12.5
2.1 1 12.5
2.2 1 12.5
3.1 2 12
3.2 2 12
4.1 2 16
4.2 2 10
Total Marks 100
Assessor’s Name Signature Date
__/__/__
This is the cover page for your assignment. Each task must have this cover page. A missing cover page will require you
to resubmit the task and a fee of MVR 100 will be charged. Read the document titled “Additional Guidance on
Assignments” for help on the general report format, general presentation format and referencing. End of cover page.

Statement of Grades:
Marks Representative Grade Grade Interpretation
85 & Above A* Higher Distinction
75 to 84 A Distinction
65 to 74 B Merit
50 to 64 C Pass
Below 50 F Fail

Page 1 ADBMS Hussain Riyaz (Student ID:5201) Bachelor’s Degree Year 3 IT


Advanced Database Management Systems

Hussain Riyaz

BIT/Bachelor of Information Technology


Maldives Business School
23rd September 2023

2657 words

Abstract

An advanced database management system (DBMS) refers to a sophisticated software


application designed to store, retrieve, and manage large volumes of structured data efficiently.
Unlike traditional database management systems, advanced systems integrate specialized
features and techniques to handle complex data requirements, ensuring performance, security,
and scalability.

Page 2 ADBMS Hussain Riyaz (Student ID:5201) Bachelor’s Degree Year 3 IT


TABLE OF CONTENTS
ASSESSMENT BRIEF ....................................................................................................... 1
Abstract .................................................................................................................................................................... 2
TABLE OF CONTENTS ............................................................................................................................................ 3
Introduction .............................................................................................................................................................. 4
Question 1 ................................................................................................................................................................ 6
Question 2 ................................................................................................................................................................ 8
Question 3 ................................................................................................................................................................ 9
Question 4 ..............................................................................................................................................................12
Conclusion and recommendations .........................................................................................................................14
References ..............................................................................................................................................................14

Page 3 ADBMS Hussain Riyaz (Student ID:5201) Bachelor’s Degree Year 3 IT


Introduction

A retail grocery shop named “Fresh Food Grocery” has approached me to help them
computerize a database for the shop. They are still using paper for most of their records.
They are providing copies of their paper records and a file of their current customers. Also, a
user interface is provided which hides and protects the database structure from the end
user, as well as being easy to use

ERD

Entities, relations, cardinality and attributes

1. Bill Table:
Entities:
- BNum (primary key)
- BDate
- CustID (foreign key referencing Customer Table)
- CustName
- EmpName
- Amt
Relations:
- Bill to Customer (through CustID)
- Bill to Employee (through EmpName)
Cardinality:
- Bill to Customer: Many-to-One (Many bills can belong to one customer)
- Bill to Employee: Many-to-One (Many bills can be associated with one employee)
Attributes:
- BNum (primary key)
- BDate

Page 4 ADBMS Hussain Riyaz (Student ID:5201) Bachelor’s Degree Year 3 IT


- CustID (foreign key)
- CustName
- EmpName
- Amt

2. Customer Table:
Entities:
- CutsID (primary key)
- CustName
- CustAdd
- CustPhone
Relations:
- Customer to Bill (through BNum)
Cardinality:
- Customer to Bill: One-to-Many (One customer can have many bills)
Attributes:
- CutsID (primary key)
- CustName
- CustAdd
- CustPhone

3. Employee Table:
Entities:
- EmpNum (primary key)
- EmpName
- EmpAdd
- EmpDOB
- EmpPhone
- EmpPass
Relations:
- Employee to Bill (through EmpName)
Cardinality:
- Employee to Bill: One-to-Many (One employee can be associated with many bills)
Attributes:
- EmpNum (primary key)
- EmpName
- EmpAdd
- EmpDOB
- EmpPhone
- EmpPass

4. Product Table:
Entities:
- PrID (primary key)
- PrName
- PrCat
- PrQty
- PrPrice
Attributes:
- PrID (primary key)
- PrName
- PrCat
- PrQty
- PrPrice

Page 5 ADBMS Hussain Riyaz (Student ID:5201) Bachelor’s Degree Year 3 IT


TASK1: Solution and Report
You have been asked to computerize a database for organization. The organization are still using
paper for most of their records. After discussing their requirements, you have decided to implement a
database. You have been given copies of their paper records and a file of their current customers
A user interface will be provided which hides and protects the database structure from the end user,
as well as being easy to use All data entered by the user should be validated prior to being saved in
the database.
Write a report on it titled “Planning, Proposing and implementing Database.” In your report
you must explain the process of planning, proposing, and implementing the application. Your report
must also include testing and future work. Include in your report the diagrams and pictures for the
purpose of illustration. Your report must be unified and coherent.

Planning, Proposing and implementing Database

Question 1
1. Discuss the Uses, tools and technique used in database (1.1) (12 Marks)
A. Identify the different use of database.
B. Critically evaluate Tools and techniques used in database

Some of the constraints that can be applied to ensure data integrity:

1. Bill Table:
Primary Key Constraint:
BNum is the primary key, which means it must be unique for each record in the Bill table.
Foreign Key Constraint:
CustID is a foreign key referencing the CustID in the Customer Table.
Not Null Constraints:
BNum, BDate, CustID, CustName, EmpName, Amt cannot be null.

2. Customer Table:
Primary Key Constraint:
CustID is the primary key, which means it must be unique for each record in the
Customer table.
Not Null Constraints:
CustID, CustName, CustAdd, CustPhone cannot be null.

3. Employee Table:
Primary Key Constraint:
EmpNum is the primary key, which means it must be unique for each record in the
Employee table.
Not Null Constraints:
EmpNum, EmpName, EmpAdd, EmpDOB, EmpPhone, EmpPass cannot be null.

4. Product Table:
Primary Key Constraint:
PrID is the primary key, which means it must be unique for each record in the Product
table.

Page 6 ADBMS Hussain Riyaz (Student ID:5201) Bachelor’s Degree Year 3 IT


Not Null Constraints:
PrID, PrName, PrCat, PrQty, PrPrice cannot be null.

I have chosen Microsoft SQL Server as RDBMS. Microsoft SQL Server is a robust and versatile
RDBMS that is well-suited for enterprise-level applications. Its extensive feature set, integration
capabilities, and strong support from Microsoft make it a popular choice for organizations across
various industries.

Advantages and challenges with the chosen database

Advantages

1. Integration with Microsoft Ecosystem: Seamless integration with other Microsoft products
and technologies, making it a natural choice for organizations already using Microsoft solutions.

2. Comprehensive Feature Set: a wide range of features including advanced security options,
high availability solutions, robust backup and recovery mechanisms, and extensive support for
different data types and operations.

3. Scalability and Performance:


Advantage: Known for handling large datasets and complex workloads. It can be optimized for
high-performance scenarios with features like partitioning, indexing options, and in-memory
processing.

4. Robust Security Features: Provides robust security measures including role-based access
control, encryption, auditing, and fine-grained access permissions.

5. Advanced Query Optimization: Includes a sophisticated query optimizer that efficiently


handles complex queries, ensuring fast response times for data retrieval operations.

6. Enterprise-Level Support: Microsoft offers extensive support and resources for SQL Server,
including documentation, forums, and a dedicated support team.

7. Built-In Business Intelligence Capabilities: Comes with integrated business intelligence


features such as Reporting Services, Analysis Services, and Integration Services for reporting,
data analysis, and data integration workflows.

8. Developer-Friendly Environment: Provides a user-friendly development environment with


tools like SQL Server Management Studio (SSMS) and Visual Studio integration, making it
easier for developers to design, develop, and manage the database.

9. Licensing Options: Offers a range of licensing options, including both on-premises and
cloud-based solutions through Microsoft Azure, providing flexibility in choosing a licensing
model that fits budget and operational requirements.

Challenges

1. Licensing Costs: Depending on the edition and deployment model, SQL Server can be
relatively expensive, especially for large-scale enterprise applications.

Page 7 ADBMS Hussain Riyaz (Student ID:5201) Bachelor’s Degree Year 3 IT


2. Limited Cross-Platform Support: While SQL Server is available for Linux, it historically has
been primarily designed for the Windows platform, which may be a limitation for organizations
with diverse operating systems.

3. Resource Intensive: SQL Server can be resource-intensive, particularly for complex


operations and large databases. Proper hardware and optimization strategies may be required
for optimal performance.

4. Complexity of Configuration: Setting up and configuring SQL Server, especially in high


availability and distributed environments, can be complex and may require specialized
knowledge.

5. Vendor Lock-In: Choosing SQL Server can lead to a certain level of vendor lock-in,
particularly if an organization heavily relies on other Microsoft technologies.

6. Limited Community Support: there is a substantial user base and extensive Microsoft
documentation, community support may be less robust compared to open-source databases.

Question 2
2. Discuss Databases and its relationships. (1.2) (12 marks)
A. Identify and explain the different types of databases.
B. Identify and explain the different types of relationship.

Tables
• Bill Table
• Customer Table
• Employee Table
• Product Table

ERD Diagram to Table

Page 8 ADBMS Hussain Riyaz (Student ID:5201) Bachelor’s Degree Year 3 IT


Question 3
3. Understand the Designing and design methodologies of Relational DBMS: (2.1)
(16 marks)
A. Explain the features of a relational database.
B. Design a relational database for a specified user need.

• I have implemented my ERD in Microsoft SQL Server using Microsoft SQL Server
Management Studio (MSSMS).

• I am using sqllocaldb as my server. I created a server named (LocalDB)\MyLocalDB on


my PC.

• Created a new database named “FreshFoodGrocery”


• Added Tables BillTbl, CustomerTble, EmployeeTbl and ProductTbl

Page 9 ADBMS Hussain Riyaz (Student ID:5201) Bachelor’s Degree Year 3 IT


User Help Documentation - Fresh Food Grocery Database
Welcome to the backend of the Fresh Food Grocery database! This document will guide you
through the various functionalities and operations you can perform.

Table of Contents

1. Introduction
2. Accessing the Database
3. Database Structure
4. Managing Customer Records
5. Product Management
6. Employee Management
7. Transaction Processing
8. Backup and Maintenance
9. Troubleshooting

1. Introduction
The backend of the Fresh Food Grocery database is where all the data management operations
are performed. It allows you to handle customer, employee records, products, and transactions
effectively.

2. Accessing the Database


To access the database, please follow these steps:
• Open the provided user interface on your computer.
• Log in using your credentials.
• You will now have access to the backend functionalities.

3. Database Structure
The database is structured into the following main entities:
• Customers: Contains information about the store's customers.
• Products: Stores details about the various products available.
• Transactions: Records all the sales transactions.
• Employee Records: Stores details of the employees.

4. Managing Customer Records


Adding a New Customer
• Click on "Customers" in the menu.
• Fill in the required fields and click "Save."

Editing Customer Information


• Navigate to the customer you want to edit in the customer list.
• Make the necessary changes and click "Edit."

Deleting a customer

Page 10 ADBMS Hussain Riyaz (Student ID:5201) Bachelor’s Degree Year 3 IT


• Navigate to the customer you want to delete in the customer list.
• Click on the "Delete" button.

5. Product Management
Adding a New Product
• Click on "Products" in the menu.
• Fill in the required fields and click "Save."

Editing Product Information


• Navigate to the product you want to edit in the product list.
• Make the necessary changes and click "Edit."

Deleting a Product
• Navigate to the product you want to delete in the product list.
• Click on the "Delete" button.

6. Employee Management
Adding a New Employee
• Click on "Employees" in the menu.
• Fill in the required fields and click "Save."

Editing Employee Information


• Navigate to the employee you want to edit in the employee list.
• Make the necessary changes and click "Edit."

Deleting a Product
• Navigate to the employee you want to delete in the employee list.
• Click on the "Delete" button.

7. Transaction Processing

6.1 Recording a Sale


• Click on "Billings" in the menu.
• Choose the products involved, and enter the quantity sold.
• Click "Print"

8. Backup and Maintenance

8.1 Data Backup


• Regularly back up the database to prevent data loss. Contact your system administrator
for assistance.

8.2 Database Maintenance


• Periodically perform maintenance tasks to optimize performance. Contact your system
administrator for assistance.

Page 11 ADBMS Hussain Riyaz (Student ID:5201) Bachelor’s Degree Year 3 IT


9. Troubleshooting

• If you encounter any issues or have questions, please contact the support team at the
hotline number 3693522

Question 4
4. Explain the Design documentation in RDBMS. (2.2) (10 marks)
A. Identify and explain different tools for Design documentation.
B. Identify and explain the validation and verification procedure.

Tool used: SQL Server Management Studio (SSMS)

• Purpose: SSMS is a comprehensive tool provided by Microsoft for managing and


interacting with SQL Server databases.
• Features: It allows you to execute SQL queries, manage database objects, perform data
manipulation, and run scripts for testing various constraints.
• Constraints Testing: You can use SSMS to directly interact with the database and
execute SQL statements to test constraints.

Test Cases

Objectives of
Test Actual Test environment
S.No the test Test Name Expected results
Date results
document

Database should reject


Primary Key Duplicate Primary Key SQL Server Management
1 18/9/23 insertion with duplicate Pass
Constraint Values (Bill Table) Studio
primary key

Database should reject


Primary Key Null Primary Key Value (Bill SQL Server Management
2 18/9/23 insertion with null primary Pass
Constraint Table) Studio
key

Referencing Non-existent Database should reject


Foreign Key SQL Server Management
3 Foreign Key Value (Bill 18/9/23 insertion with non-existent Pass
Constraint Studio
Table) foreign key value

Database should enforce


Deleting Parent Record
Foreign Key referential integrity and SQL Server Management
4 with Related Child Records 18/9/23 Pass
Constraint reject or cascade delete Studio
(Bill Table)
based on design

Database should reject


Not Null Inserting Null Value in Not SQL Server Management
5 18/9/23 insertion with null value in Pass
Constraint Null Field (Bill Table) Studio
not null field

Database should reject


Primary Key Duplicate Primary Key SQL Server Management
6 18/9/23 insertion with duplicate Pass
Constraint Values (Customer Table) Studio
primary key

Database should reject


Primary Key Null Primary Key Value SQL Server Management
7 18/9/23 insertion with null primary Pass
Constraint (Customer Table) Studio
key

Page 12 ADBMS Hussain Riyaz (Student ID:5201) Bachelor’s Degree Year 3 IT


Referencing Non-existent Database should reject
Foreign Key SQL Server Management
8 Foreign Key Value 18/9/23 insertion with non-existent Pass
Constraint Studio
(Customer Table) foreign key value

Database should enforce


Deleting Parent Record
Foreign Key referential integrity and SQL Server Management
9 with Related Child Records 18/9/23 Pass
Constraint reject or cascade delete Studio
(Customer Table)
based on design

Database should reject


Not Null Inserting Null Value in Not SQL Server Management
10 18/9/23 insertion with null value in Pass
Constraint Null Field (Customer Table) Studio
not null field

Page 13 ADBMS Hussain Riyaz (Student ID:5201) Bachelor’s Degree Year 3 IT


Conclusion and recommendations
The process of computerizing the database for "Fresh Food Grocery" has been successfully
completed. The transition from paper-based records to a digital database marks a significant
step towards efficiency and accuracy in managing the store's operations. The database has
been designed with well-defined constraints to ensure data integrity and reliability.

Throughout the implementation, various tests were conducted to validate the constraints,
including primary keys, foreign keys, and not null constraints. These tests confirmed that the
database functions as intended, with constraints effectively preventing unauthorized or
erroneous data entry.

References

1. Book: "Database Systems: The Complete Book"


Author: Hector Garcia-Molina, Jeffrey D. Ullman, Jennifer Widom
Year: 2008
Publisher: Prentice Hall
ISBN: 978-0131873254
2. Book: "Modern Database Management"
Author: Jeffrey A. Hoffer, Ramesh Venkataraman, Heikki Topi
Year: 2017
Publisher: Pearson
ISBN: 978-0133876703
3. Website: Oracle Documentation on Advanced Database Management
Source: Oracle Corporation
URL: https://docs.oracle.com/en/database/
4. Website: Microsoft SQL Server Documentation
Source: Microsoft Corporation
URL: https://docs.microsoft.com/en-us/sql/

Page 14 ADBMS Hussain Riyaz (Student ID:5201) Bachelor’s Degree Year 3 IT

You might also like