Databases 2
Databases 2
Outline the functions The five most important functions and tools of a DBMS are:
and tools of a DBMS. Data storage and retrieval - storing data in a structured format and retrieving it
efficiently.
-Data security - ensuring only authorized users can access and modify data.
-Data backup and recovery - backing up data and recovering it in case of
system failure or data loss.
-Transaction management - processing transactions reliably and consistently.
-Query optimization - optimizing queries to improve performance and
minimize resource usage.
Describe how a DBMS A DBMS promotes data security by controlling user access, encrypting data,
can be used to promote auditing user activity, providing backup and recovery, and masking sensitive
data security. data. These measures help prevent unauthorized access, data tampering,
and data loss.
Define the term schema Is a logical structure that represents the organization and relationship of data
related to a RDBS elements in a database. It defines the tables, columns, data types,
constraints, and relationships that make up the database. The schema is used
to create, modify, and delete database objects, and it provides a blueprint for
data storage and retrieval.
In simpler terms, a schema is like a blueprint or plan for how the database is
structured and how the data is organized within it. It provides a framework for
the database and defines the rules and relationships that govern how data is
stored, retrieved, and managed. The schema is typically created and
managed by a database administrator or a database designer.
Logical Schema:
-Describes how the data is stored and accessed in terms of tables and
relationships.
-Dependent on the hardware and software used to store and manage the
data.
-Defines tables, columns, constraints, relationships, views, and other
database objects.
Physical Schema:
-Describes how the data is physically stored on the storage medium.
-Dependent on the hardware and software used to store and manage the
data.
-Specifies the storage format, access methods, and physical location of the
data.
Overall, the conceptual schema represents the big picture of the database,
the logical schema defines the structure of the data, and the physical schema
specifies how the data is stored on disk.
Explain the importance A Data Definition Language (DDL) is essential in implementing a data model
of a data definition as it provides a standard syntax and structure for creating and modifying
language in database objects, ensures data integrity, improves efficiency and security, and
implementing a data provides documentation of the database structure.
model.
Explain the importance Data modeling is the process of creating a conceptual representation of data
of data modelling in the objects, relationships, and rules in a database. is essential in the design of a
design of a database. database as it helps to ensure data integrity, optimize the database structure,
facilitate communication between stakeholders, and manage the complexity of
the database.
Identify the different One-to-One (1:1): In this type of relationship, one record in a table is
types of relationships associated with only one record in another table, and vice versa. For example,
within databases: one a person can have only one passport and a passport can be issued to only
to- one, one-to-many, one person.
many-to many.
One-to-Many (1:N): In this type of relationship, one record in a table is
associated with one or more records in another table. For example, one
customer can have multiple orders in a database.
Outline the issues Redundant data means the unnecessary duplication of data in a database,
caused by redundant which can lead to data inconsistency, increased storage requirements,
data. reduced performance, update anomalies, and security risks. Eliminating
redundant data is important to ensure data quality and maintain a
high-performing and secure database.
Outline the importance Referential integrity is important in a normalized database because it helps to
of referential integrity in ensure the accuracy, consistency, completeness, and security of data by
a normalized database. enforcing relationships between tables and preventing orphaned records. It
plays a critical role in maintaining a high-quality and reliable database.
Describe the differences 1NF ensures that each column contains atomic values, 2NF ensures that all
between 1st Normal non-key attributes are dependent on the primary key, and 3NF ensures that
Form (1NF), 2nd Normal there are no transitive dependencies in the table. Each normal form builds on
Form (2NF) and 3rd the previous one to create a more structured and normalized database.
Normal Form (3NF).
Explain the role of a A database administrator (DBA) is responsible for the design, implementation,
database administrator. maintenance, and security of an organization's database systems. The DBA
ensures that the database is running smoothly, efficiently, and reliably, and
that the data is secure, accurate, and consistent
Explain how end-users End-users can interact with a database through a graphical user interface,
can interact with a SQL queries, reports, and application programming interfaces. These tools
database. allow users to view, modify, and retrieve data from the database, depending
on their level of access and the features available in the database system.
The goal is to provide users with a user-friendly and efficient way to access
the information they need.
Describe different Database recovery is an essential process to ensure that data is not lost due
methods of to a system failure or other issue. The method of recovery used will depend
database recovery on the specific situation and the capabilities of the database system being
used.
1. Rollback: This method involves undoing a transaction that was not
completed due to a system failure or other issue. The database
system uses the undo logs to roll back the transaction and restore the
database to its previous state.
2. Rollforward: This method involves redoing a transaction that was
partially completed before a system failure. The database system uses
the redo logs to roll forward the transaction and restore the database
to its current state.
3. Point-in-time Recovery: This method involves restoring the database
to a specific point in time before a system failure. The database
system uses the backup and transaction logs to restore the database
to the specified point in time.
4. Complete Recovery: This method involves restoring the entire
database from a backup. The database system may also use the
transaction logs to apply any changes that were made since the last
backup was taken.
5. Parallel Recovery: This method involves using multiple processors or
servers to recover the database more quickly. The database system
may divide the recovery process into multiple tasks and assign them to
different processors or servers.
Outline the use of In all these areas, databases play a critical role in enabling efficient data
databases in management, analysis, and retrieval. They allow organizations to make
areas such as stock data-driven decisions and improve their operations by providing a reliable and
control, police scalable platform for storing and managing data
records, health records, 1. Stock Control: In retail, databases are used to track sock levels,
employee manage inventory, and monitor sales trends. They can also help
data retailers forecast demand, optimize supply chains, and improve
customer satisfaction.
2. Police Records: Law enforcement agencies use databases to store
information related to criminal investigations, including suspect
profiles, case histories, and evidence records. This information can be
shared across different agencies to aid in criminal investigations and
prosecution.
3. Health Records: Healthcare organizations use databases to store and
manage patient data, such as medical history, treatment plans, and
test results. This information can be used to make informed decisions
about patient care and to track the effectiveness of treatments.
4. Employee Data: Human resources departments use databases to
manage employee information, such as job history, performance
reviews, and payroll data. This information can be used to track
employee performance, ensure compliance with labor laws, and
manage benefits and compensation.
Suggest methods to Protecting personal data is a shared responsibility that requires organizations
ensure the privacy of to implement strong security measures, establish clear privacy policies, obtain
the personal data and explicit consent, regularly monitor data usage, and provide timely notifications
the responsibility of of data breaches. By doing so, organizations can help ensure the privacy and
those holding personal security of personal data and build trust with their customers.
data not to sell or 1. Implement Strong Data Security Measures
divulge it in any way. 2. Establish Clear Privacy Policies
3. Obtain Consent for Data Collection
4. Regularly Audit and Monitor Data Usage
5. Provide Data Breach Notifications
Discuss the need for The need for some databases to be open to interrogation by other parties,
some databases such as the police or government, is often driven by the need to ensure public
to be open to safety, prevent criminal activity, and enforce laws and regulations. Here are
interrogation by other some reasons why some databases may need to be open to interrogation:
parties (police, 1. Law Enforcement and National Security: Law enforcement and
government, etc). national security agencies may need access to certain databases to
prevent and investigate criminal activity, terrorism, and other threats to
public safety. For example, the police may need access to databases
of criminal records and arrest warrants to locate and apprehend
suspects.
2. Regulatory Compliance: Regulatory agencies may need access to
certain databases to ensure compliance with laws and regulations. For
example, health inspectors may need access to restaurant inspection
reports to ensure that food safety standards are being met.
3. Emergency Response: Emergency response agencies may need
access to certain databases to respond to emergencies and disasters.
For example, firefighters may need access to building plans to quickly
identify the location of fire exits and other safety features.
4. Public Health: Public health agencies may need access to certain
databases to monitor and respond to disease outbreaks and other
public health threats. For example, public health officials may need
access to hospital records to track the spread of infectious diseases.