0% found this document useful (0 votes)
43 views14 pages

Question 1 To 7 Notes (Defn)

Data refers to raw facts that have no specific meaning, while information refers to processed data that is meaningful and useful. To resolve a many-to-many relationship, a third junction table is created with foreign keys linking to the other tables. Normalization reduces data redundancy and improves data integrity by eliminating anomalies that can occur with insertion, deletion, and updates. A relational database stores and accesses data points that are related to one another in tables.

Uploaded by

Khin Myint
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views14 pages

Question 1 To 7 Notes (Defn)

Data refers to raw facts that have no specific meaning, while information refers to processed data that is meaningful and useful. To resolve a many-to-many relationship, a third junction table is created with foreign keys linking to the other tables. Normalization reduces data redundancy and improves data integrity by eliminating anomalies that can occur with insertion, deletion, and updates. A relational database stores and accesses data points that are related to one another in tables.

Uploaded by

Khin Myint
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 14

Question 1

1. (a) Explain the difference between data and information. You may use examples to
help you explain your answer. (4 marks)
While working on a computer, the terms data and information are used interchangeably by many
people most of the time. However there are significant different between data and information.
Data refers to raw facts there have no specific meaning.
Information refers to processed data that has a purpose and meaning.
Data or raw fact is not enough to make a decision.
Information is sufficient to help make a decision in a respective context.
Data is a collection of one or more values. These values are not meaningful, raw facts, and
descriptions such as characters, numbers or any other data type. The data is processed to make it
meaningful.
In other words, data are referred to as individual unit of information. In computing, data is
represented as bits and bytes. In the data analysis, it is denoted as variables. Moreover, the data is
always interpreted by humans or machines to make it meaningful.
Information is interpreted data, structured and meaningful that has been already processed. It is
meaningful and useful so that human being can read and easily understand it and use it.

1. (b) Identify FOUR (4) types of records/entities about which a florist might store data. (4 marks)
Customer
Employee
Product
Supplier
Order
Payment
StoreLocation
Inventory
Promotion

1. (c) Explain what a many-to-many relationship is and describe what could be done to
resolve it. (4 marks)
In many-to-many relationship, one or more records in one table have a relationship to one or more
records in another table. For example: a student can have multiple subjects and a subject can have
multiple students.
Eg: a bookstore – a book can have multiple authors and an author can write multiple books.

1
To resolve a many to many relationship, create a third table, referred to as junction table or linking
table. In the junction table, there have two foreign key, one linking to book table and the other
linking to author table. The junction table represents the relationship between books and authors.
Here is the example of how the table look like:
Book table
bookID (primary key)
title
isbn

Author table
authorID (primary key)
authorName
gender
address

BookAuthor – junction table


bookAuthorID (primary key)
bookID (foreign key reference Book table)
authorID (foreign key reference Author table)

2. (b) What constraint could be added to the MarketValue field so that negative figures or
figures above £500,000 can’t be added. (2 marks)
MarketValue int check(MarketValue >= 0 and MarketValue <= 50000

3. (c) Explain the term metadata. You should make Two points to gain full marks. (2 marks)
Metadata refers to data about data. It means it is the description of the data. It helps to organize, find
and understand data.
Relational databases store and provide access not only to data but also metadata in a structure called
data dictionary or system catalog. It holds information about:
tables,
columns,
data types,
table relationship,
constraints etc.

2
A data dictionary is a description of data objects. A data dictionary contains a list of all files in the
database, the number of records in each file, and the names and types of each field. Most database
management systems keep the data dictionary hidden from users to prevent them from accidentally
destroying its contents.
Accessing metadata in RDBMS:
RDBMS provides access to their metadata with a set of tables or views often called system catalog or
data dictionary. We can access those views using plain SQL statements.
select *
from tables

4. (b) Explain the term referential integrity and give an appropriate example to show referential
integrity in practice. (4 marks)
Referential integrity refers to the accuracy and consistency of data within a relationship. In
relationships, data is linked between two or more tables. This is achieved by having the foreign
key reference a primary key value in the parent table. Referential integrity requires that, whenever a
foreign key value is used it must reference a valid, existing primary key in the parent table.
For example, if we delete row number 15 in a primary table, we need to be sure that there’s no
foreign key in any child table with the value of 15.
There are two referential integrity constraint:
Insert Constraint: Value cannot be inserted in CHILD Table if the value is not lying in MASTER
Table
Delete Constraint: Value cannot be deleted from MASTER Table if the value is lying in CHILD
Table

6. (b) If a table is said to be in First Normal Form (1NF) what rules will have been followed? State
Three (3) rules for 1NF. (3 marks)
A relation will be 1NF if it contains an atomic value.
It states that an attribute of a table cannot hold multiple values. It must hold only single-valued
attribute.
First normal form disallows the multi-valued attribute, composite attribute, and their combinations.
empID empName empPhone
1 Zaw Zaw 09794512215, 09123654795
2 Ni Ni 09214526325, 09124152145
Each cell of the relation contains exactly single value. (atomic value)
Each column in a table has a unique name.
A column values have the same domain.
Each table must have primary key.
Each row is unique, there is no duplicate record.

3
7. (b) Explain Two (2) benefits of carrying out normalization.
Data normalization reduce redundant data. It can eliminate data inconsistency, reduce storage space
and maintenance costs. It enable faster and easier data processing and querying.
Data consistency means that the data is always real and it is not ambiguous.
No redundant data means that there is no multiple copy of the same data.
Normalization can reduce insertion, deletion and updating anomalies.
Insertion anomaly is an anomaly that occurs when the data is inserted into the database. The data is
not completely inserted into the database or correctly inserted. If data is completely inserted into the
database then the data is not correctly enter.
Deletion anomaly is
Updating anomaly is

8. (a) Explain the term relational database. (2 marks)


RDBMS
A relational database is a type of database that stores and access to data points that are related to one
another. Relational databases are based on the relational model, represent data in tables.

8. (b)
Just for Knowledge
Adv of dbms
Controlling Redundancy
Restricting Unauthorized Access
Providing Backup and Recovery
Enforcing Integrity Constraints

From Geeksforgeek
Better data transferring
Better data security
Better data integration
Minimized data inconsistency
Faster data access
Better decision making
4
Increased end-user productivity
Simple
Data abstraction
Reduction in data redundancy
Application development
Data sharing
Data organization
The atomicity of data can be maintained
Concurrent access
Data consistency and accuracy
Improved data security
Efficiency data access and retrieval
Scalability and flexibility
Improved productivity

Data integrity and security


DBMS provides a centralized approach to data management that ensures data integrity and
security. DBMS allows defining constraints and rules to ensure that data is consistent and accurate.
Reduced data redundancy
DBMS eliminates data redundancy by storing data in a structured way.
Improved data consistency
DBMS ensures data consistency by enforcing data validation rules and constraints. This
ensures that data is accurate and consistent across different applications and users.
Improved data access and availability
DBMS provides efficient data access and retrieval mechanisms that enable quick and easy
data access. It allows multiple users to access the data simultaneously, ensuring data availability.
Improved data sharing
DBMS provides a platform for sharing data across different applications and users. It allows
sharing data between different departments and systems within an organization, improving
collaboration and decision-making.
Improved data backup and recovery
DBMS provides backup and recovery mechanisms that ensure data is not lost in case of a
system failure. It allows restoring data to a specific point in time, ensuring data consistency.
Data sharing

5
DBMS allows multiple users to access and modify the same data simultaneously, without
conflicts or data loss. This facilitates collaborative work and improves data consistency across the
organization.
Data independence
DBMS separates the logical and physical view of data, which allows users to manipulate data
without having to know its physical location or structure. This provides flexibility and reduces the
risk of data corruption due to changes in the underlying hardware or software.
Data integrity
DBMS enforces data integrity constraints such as referential integrity, entity integrity, and
domain integrity, which prevent data inconsistencies and errors. This ensures that data is accurate,
complete, and consistent.
DBMS ensures data integrity by enforcing constraints, such as primary keys, foreign keys, and
unique keys. It prevents duplicate records and ensures that data is accurate and consistent.
Data security
DBMS provides various security mechanisms such as authentication, authorization, and
encryption, which protect data from unauthorized access, modification, or theft. This ensures that
sensitive data is protected from internal and external threats.
DBMS provides data security features such as access control, authentication, and
authorization. It ensures that only authorized users can access and modify data.
Transaction Management: DBMS provides transaction management to ensure that all database
operations are performed in a consistent and reliable manner. It ensures that the database remains in
a consistent state, even in case of system failures or interruptions.
Concurrency Control: DBMS provides concurrency control to allow multiple users to access and
modify data simultaneously without interfering with each other's work. It ensures that data remains
consistent even when multiple users are modifying it concurrently.

Data backup and recovery


DBMS provides backup and recovery mechanisms, which enable organizations to recover
lost or damaged data quickly and efficiently. This reduces the risk of data loss and ensures business
continuity.
Reduced data redundancy
DBMS eliminates data redundancy by storing data in a centralized location and providing
mechanisms for data sharing and reuse. This reduces data storage requirements and improves data
consistency.
Overall, DBMS offers several advantages over traditional file-based systems. It ensures data
integrity, security, and consistency, reduces data redundancy, and improves data access, sharing, and
integration. These benefits make DBMS an essential tool for managing and processing data in
modern organizations.

What is DBMS?
6
A database management system (DBMS) is software that manages and organizes data in a database.
It provides an interface between the users and the database, allowing users to access and manipulate
the data stored in the database.
DBMSs allow users to create, update, retrieve, and delete data from the database. They also provide
a range of features to ensure the consistency, integrity, and security of the data. Overall, DBMSs are
an essential tool for managing large amounts of data in a structured and efficient way and are widely
used in many industries and applications, from finance and healthcare to e-commerce and social
media.

Disadvantages of DBMS
High Cost: Implementing a DBMS can be expensive due to the cost of licensing, hardware, and
maintenance. This cost can be particularly significant for smaller organizations.
Complexity: DBMS is a complex software that requires a significant amount of technical expertise to
install, configure, and maintain. This complexity can lead to increased maintenance costs and
technical difficulties.
System Overhead: DBMS requires system resources such as memory, CPU, and disk space, which
can lead to system overhead and reduced system performance.
Single Point of Failure: DBMS represents a single point of failure for an organization's data. If the
DBMS fails, it can lead to significant data loss and downtime, which can have a severe impact on the
business.
Cost of Hardware and Software
Processor with high speed of data processing and memory of large size is required.
Cost of Data Conversion
Very difficult and costly method to convert data file into database.
Cost of Staff Training
A lot of amount for the training of staff to run the DBMS.
Appointing Technical Staff
Trained technical persons such as database administrator, application programmers, data
entry operators are required to handle the DBMS.
Database Damage
All data is integrated into a single database. If database is damaged due to electric failure or
database is corrupted on the storage media, then your valuable data may be lost forever.
DBMS is expensive
DBMS requires highly professional staff, sophisticated hardware and software that makes it quite
expensive to implement and maintain. Also, training costs for staff and licensing costs are significant
7
ones that add to the total cost of DBMS operations. Thus, heavy investment in database technology
results in DBMS being expensive.

Complexity issues
DBMS is very complex to operate and manage. It requires skilled personnel to maintain, so it’s
difficult for non-technical people to understand its working. If one doesn’t use DBMS properly, then
there can be system failure issues. These issues can lead to database failure or data loss.
Staff Training and Expense: A huge amount of cost is also required for training and educating staff
that maintains the database, Hiring new staff and giving them also increases the overall expense.
Cost of Data Conversion: we have to convert all our data into a database management system, and
for that skilled database designers are required for designing the entire database, Hence a large
amount of money is required for their salaries and the software required to design the database. all
these add ups to increased costs.
Complexity
The database management system is very complex to use and normal people cannot understand how
to use its software before proper training. So, for proper design of the database and management of
the database skilled engineers, developers, and database administrators are required. The database
structure can also be Complex and if it is designed or mapped in the wrong way it can lead to data
loss or wrong management of data which could affect the organization’s data, As it is a complex task
to maintain data in the database management system, it requires a lot of manpower, staff, and
software needed to do so.
Database Failure
Database Failure is one of the biggest disadvantages of a database management system. it requires a
lot of maintenance and constant power. Data stored on DBMS is centralized in nature, if the database
server fails, the whole system will fail and the organization will be affected.
Performance
The database management system works very fast when the data is less to work on, But as the data of
the organization grows, the system becomes heavier and heavier and the performance of a DBMS
decreases, so sometimes the file management system is preferred over the database management
system.
Huge Size
As the data acquired by the organization increases, more storage space is needed to set up. But
increasing the storage space makes the database heavier, so searching and storing of data becomes
slow and DBMS software takes more time to fetch queries which makes it inefficient.

Question 2
1. (a) A library loans out books to borrowers. The entity relationship diagram (ERD) below contains
a many-to-many relationship. Redraw the ERD to remove the many-to-many.
8
Explain the process you have undertaken. (4 marks)

1. (b) Identify FOUR types of entities a Cruise Liner company might store data about. (4 marks)
Customer
CruiseStaff
CruiseRoute
Booking

Question 3
1. (a) Identify FOUR main functions for which a supermarket would use a database. (4 marks)
Inventory management: The database helps track and manage the stock levels of all products in the
store
Sales Information: It can record and view sale information, including items purchased, quantities,
prices, and payment methods. This data is essential for sales analysis and financial reporting.
Customer Information: Stores customer data such as names, contact details, purchase history, loyalty
program information, and preferences to personalize marketing and improve customer service.
Supplier Information: Maintains information about suppliers, including contact details, product
catalogs and pricing.
Employee Records: Manages employee information, including contact details, roles, schedules, and
payroll data.

1. (b) Identify TWO functions of a DBMS. (2 marks)


DBMS allows users to create, read, update, and delete data in the database.
DBMS means Database Management System, which is a tool used to create, delete or update the
database in a very fast and efficient way. It is basically a software which is used by the database
engineers to create or manipulate the database.
DBMS provides several functionalities, which are:
Data Storage Management
One of the most important tasks for DBMS is to create a database for complex data and manage the
data. Modern database systems not only provide storage for the data but they store and manage the
metadata (data of data).
Security Management
Database systems provide a high level of security measures using various security algorithms to keep
the data safe and ensure the data privacy. There are certain security rules that ensure what data can
be accessed from the database and which user can access it. It also makes sure what operations (read,
write, delete) can be performed on the specific data. It is very important for the organizations where
multi-user databases are required.
9
Backup and Recovery Management
To keep the data safe and ensure the integrity, the database system provides the features for backup
and recovery management. If the system fails due to some reason then it recovers the data and keeps
the data safe.
Data Dictionary Management
In the data dictionary, it stores the data and its related information about its relationship. So, a data
dictionary keeps the data structures and their relationships with other data, so that a programmer is
not responsible for storing the relationship in the database through complex coding. DBMS provides
the data abstraction and removes the dependency of the data.
Multi User Access Control
Multi User Access control is provided by the modern Database Systems so that multiple users can
access the database at the same time without any problem. It also follows the ACID property, so the
database will be consistent while multiple users are accessing it concurrently. It is very useful for the
database of organizations where multiple database engineers are working concurrently.

ACID property maintain the integrity and consistency of data in a database management system.
Atomicity ensures that a database transaction is treated as a single, indivisible unit of work. It means
that either all the changes made by a transaction are committed to the database, or none of them are.
If any part of a transaction fails, the entire transaction is rolled back to its original state, ensuring that
the database remains consistent.
Consistency ensures that a database transitions from one consistent state to another consistent state
after a transaction is executed. In other words, a transaction should bring the database from one valid
state to another valid state. If a transaction violates the integrity constraints or rules defined for the
database, it is rolled back, and the database remains unchanged.
Isolation ensures that multiple transactions can run concurrently without interfering with each other.
Each transaction is executed as if it were the only one running, even though there may be multiple
concurrent transactions. Isolation prevents data corruption, maintaining the integrity of the database.
Durability guarantees that once a transaction is committed, its changes are permanent and will
survive any subsequent system failures, such as power outages or crashes. The changes made by a
committed transaction are stored in non-volatile storage (e.g., hard disk) and can be recovered even if
the system crashes. This property ensures the long-term persistence of data.
ACID properties are essential for ensuring the reliability and integrity of data in a database.

10
1. (c) Identify FOUR types of entities a car dealership might use to store data in. (4 marks)
Car
Customer
Employee / Staff
Manufacturer
Sales
Supplier
Service

2. (b) Identify TWO properties of a Foreign Key and draw a diagram to show an appropriate
example.
(2 marks)
A foreign key is a column in a table whose values must match values of the primary key column in
parent table. A foreign column can have NULL value.
FOREIGN KEY constraints enforce referential integrity, which essentially says that if column value
A refers to column value B, then column value B must exist.
A foreign key is a column or columns in a database that are linked to a column in a different table.

2. (c) Explain the difference between an attribute and an entity. Illustrate your answer with an
example. (2 marks)
The main difference between the Entity and an attribute is that an entity is a real-world object, and
attributes describe the properties of an Entity.

4. (b) If your relational model had a many-to-many relationship, explain what you would need to do
to resolve the issue. Draw an example to help explain your answer. (2 marks)
The key to resolve m:n relationships is to separate the two entities and create two one-to-
many (1:n) relationships between them with a third intersect entity. The intersect entity usually
contains attributes from both connecting entities.
Student – Course
Book – Borrower
4. (c) Explain what is meant by a one-to-one relationship? Draw an example to help explain your
answer. (2 marks)
One-to-one relationship is a link between two tables that one record in a table is associated
with only one record in another table.
11
Employee
DrivedCar
One-to-one relationship
8. (a) Identify TWO benefits of normalization.
Data normalization can help to reduce data redundancy, eliminate errors, inconsistencies that can
effect the accuracy of data and analysis.
Improves data integrity: By breaking down data into smaller, more specific tables, normalization
helps ensure that each table stores only relevant data, which improves the overall data integrity of the
database.
Reduces data redundancy and inconsistency: Normalization eliminates data redundancy and ensures
that each piece of data is stored in only one place, reducing the risk of data inconsistency and making
it easier to maintain data accuracy.
Facilitates data updates: Normalization simplifies the process of updating data, as it only needs to be
changed in one place rather than in multiple places throughout the database.
Simplifies database design: Normalization provides a systematic approach to database design that
can simplify the process and make it easier to develop and maintain the database over time.

Question 4
1. (a) Identify FOUR main functions for which a restaurant may want to use a computerized database
system.
Customer Management:
Storing customer information (names, contact details, preferences).
Tracking customer orders and preferences.
Managing loyalty programs and rewards.
Inventory Management:
Keeping track of ingredient quantities and expiration dates.
Alerting when stock levels are low and need to be replenished.
Managing supplier information.
Menu Management:
Storing information about menu items (names, descriptions, prices).
Handling special requests or dietary restrictions.
Tracking popularity and sales data for different menu items.
Order Processing:
Recording customer orders, including special requests.
Tracking the status of orders (e.g., preparation, cooking, delivery).

12
Handling online orders and reservations.
Sales and Revenue Tracking:
Recording sales transactions.
Calculating revenue and profits.
Generating reports for financial analysis.
Staff Management:
Managing employee schedules and shifts.
Storing employee information (names, contact details, roles).
Tracking performance, including customer feedback and ratings.
Table Management:
Keeping track of table availability and reservations.
Managing seating arrangements.
Notifying staff when a table is ready for the next guest.
Billing and Payment Processing:
Handling payment methods (cash, credit card, mobile payments).
Generating bills and receipts.
Tracking payments and handling any disputes or refunds.
Feedback and Reviews:
Collecting and storing customer feedback.
Analyzing reviews for insights and improvements.
Managing customer complaints or compliments.

1. (c) Identify FOUR table/entities a restaurant might use to store data.


Customer
Employee
Menu Item
Order
Table
Reservation
Supplier
Ingredient
Payment

13
Feedback/Review

Primary Key
A primary key is a special relational database table column (or combination of columns) designated
to uniquely identify each table record.
A primary key is used as a unique identifier to quickly parse data within the table. A table cannot
have more than one primary key.
A primary key’s main features are:
It must contain a unique value for each row of data.
It cannot contain null values.
Every row must have a primary key value.

Foreign Key
A foreign key is a column or group of columns in a relational database table that provides a link
between data in two tables. It acts as a cross-reference between tables because it references the
primary key of another table, thereby establishing a link between them.
Techopedia Explains Foreign Key
While a primary key may exist on its own, a foreign key must always reference to a primary key
somewhere. The original table containing the primary key is the parent table (also known as
referenced table). This key can be referenced by multiple foreign keys from other tables, known as
“child” tables.

14

You might also like