0% found this document useful (0 votes)
0 views

CAT - DBMS - UoE

The document discusses the importance of storage management and normalization in database management systems (DBMS). It outlines various storage concepts, file organization techniques, and the process of normalization to eliminate redundancy and ensure data integrity. Additionally, it highlights the benefits and challenges of normalization within DBMS, emphasizing the need for efficient data organization.

Uploaded by

JOHN OBARA
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

CAT - DBMS - UoE

The document discusses the importance of storage management and normalization in database management systems (DBMS). It outlines various storage concepts, file organization techniques, and the process of normalization to eliminate redundancy and ensure data integrity. Additionally, it highlights the benefits and challenges of normalization within DBMS, emphasizing the need for efficient data organization.

Uploaded by

JOHN OBARA
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

UNIVERSITY OF ELDORET.

SCHOOL OF BUSINESS AND MANAGEMENT SCIENCES.


DEPARTMENT OF BUSINESS MANAGEMENT.
BACHELOR OF COMMERCE.
DATA BASE MANAGEMENT SYSTEMS
CAT - COMP 214 - LECTURER: JAEL GUDU.
JOHN OBARA - ADM NO. BBU/2014/20.

Q1. Discuss Storage Management as a function of the DBMS.

Database storage is a fundamental aspect of database management systems that


plays a crucial role in efficiently organizing and managing large volumes of data.
Understanding how data is stored and accessed is essential for anyone working with
databases, irrespective of the experience. There are several concepts of database
storage, including file systems, page structures, and various file organization
techniques. In brief and without getting technical, I will highlight some of the storage
concepts.

✓ Database Storage:

Database storage systems vary between different DBMS implementations, each


using its own specific file formats. Different systems have distinct file formats for
storing data. Some database systems store data in a single file, while others
distribute data across multiple files for better management and performance.

✓ File Content and Pages:

At the core of database storage lies the concept of a "page." A page is a fixed-size
block of data that serves as the basic unit of I/O (Input/Output) and data storage in
most databases. Pages are primarily used to store data tuples (rows) along with
some metadata about the page itself, such as the page number and transaction
information. It's important to note that other database structures like indexes and
logs are typically managed separately and may not reside within the same pages as
data tuples.

✓ Storage Manager:

The storage manager is a critical component of the DBMS responsible for handling
read and write operations on the database files. It also manages the allocation and
deallocation of storage space within the database, ensuring efficient utilization of
resources.

1
File Organization Techniques:

Database systems employ various file organization techniques to optimize data


storage and retrieval as explained below.

✓ Heap File Organization.

Heap file organization is a simple and unordered method of storing data pages. In a
heap, new records are inserted wherever there is available space, without
maintaining any specific order. Heap storage does not provide any ordering based on
indexes or values; instead, it focuses on efficiently utilizing storage space. To locate
specific pages in a heap, the DBMS relies on metadata at the file and page levels,
such as page numbers and free space information.

✓ Tree File Organization.

Tree file organization is well-suited for efficient range queries. When you need to
retrieve records based on a range of values. These tree-based indexes allow for
quick traversal and locating of relevant pages, making range queries highly efficient.

✓ Hashing File Organization.

Hashing file organization is optimized for fast equality searches. When you need to
quickly find records based on an exact match, hashing techniques come into play.
By applying a hash function to the search key, the DBMS can directly locate the page
containing the desired record, providing excellent performance for equality queries.

✓ Page Directory and Space Management.

The page directory is a data structure used by the DBMS to map logical page
numbers to their corresponding physical locations on disk. It helps in efficiently
locating and accessing specific pages. In addition to the page directory, databases
often employ separate structures like free space maps or free lists to manage the
allocation and deallocation of storage space within the database files. These
structures keep track of available space and help optimize storage utilization.

✓ Replication and Data Redundancy.

While data replication is a crucial aspect of database systems, it is typically handled


by components separate from the storage manager. Replication involves creating
and maintaining multiple copies of data across different storage units or systems to

2
ensure data redundancy, high availability, and fault tolerance. The storage manager
focuses on the low-level management of data files and pages, while replication
mechanisms operate at a higher level to keep data synchronized across multiple
instances.

Database storage is a vital aspect of DBMS that directly impacts the performance,
scalability, and reliability of database systems. By understanding the concepts of file
systems, pages, and file organization techniques, you can make informed decisions
when designing and optimizing your databases. While the specific implementations
may vary between different database systems, the fundamental principles remain
largely consistent. As you continue to explore the world of databases, keep an open
mind, experiment with different techniques, and strive to find the right balance
between performance, storage efficiency, and data integrity. Happy data storing.

Q2. Discuss normalization and how it happens in databases.

Normalization in DBMS is a systematic approach to organize data in a database to


eliminate redundancy, avoid anomalies, and ensure data consistency, resulting in a
neat and structured table. It organizes the columns and tables of a database to
ensure that database integrity constraints properly execute their dependencies.

Normalization in DBMS is a bit like organizing your closet. Imagine you have got
clothes, shoes, and accessories all mixed up. If you wanted to find your favourite
shirt, you would have a tough time sifting through everything. Just like that,
databases can get mixed-up if data isn’t organized properly.

Types of DBMS Normal Forms

First, you need to identify what items (or entities) you have. Just like figuring out you
have shirts, shorts, and shoes, in a database, you would figure out what items you
are dealing with, like customers, orders, and products.

1. First Normal Form (1NF).

✓ The objective for 1NF is to eliminate duplicate columns from the same table and
create separate tables for each group of related data and the cardinal rule for
this form is that each column must contain atomic (indivisible) values, and each
record must be unique.

This is where you make sure everything is tidy. In your closet, this means
ensuring no clothes are folded together. Each item should have its own space. In
database terms, you would make sure that each piece of information is clear and

3
distinct. So instead of cramming multiple phone numbers into one space, you
would have each phone number listed separately.

2. Second Normal Form (2NF).

✓ The objective for 2NF is to remove partial dependencies; ensure that all non-key
attributes are fully dependent on the primary key and the rule is that the table
must be in 1NF, and all non-key columns must be dependent on the entire
primary key, not just part of it (applicable for composite keys).

Now that everything is neatly arranged, you want to make sure that each item is
associated with all the information it needs. Imagine if you had a shelf for shoes,
but you also kept a receipt there. That receipt belongs with the order details, not
the shoes. In DBMS, you would make sure every piece of information relates
directly to the main entry, so it doesn’t mix things up.

3. Third Normal Form (3NF).

✓ The objective for 3NF is to eliminate transitive dependencies while the rule is
that the table must be in 2NF, and all attributes must be directly dependent on
the primary key, meaning there should be no transitive functional dependencies.

This step ensures that everything stays connected without overlaps. If you had a
box for accessories that included your favourite earrings and a jewellery cleaner
that only applies to earrings, it’s better to keep the cleaner with other cleaning
supplies instead. In database terms, you separate information that doesn’t
directly connect to each other to keep things streamlined.

Going Further BCNF and Beyond.

Sometimes, you might need to get even more specific, like having separate
sections for casual and formal shoes. In databases, this means creating even
more focused tables to ensure every piece of data is in its perfect place, and
everything aligns perfectly.

4. Boyce-Codd Normal Form (BCNF).

✓ The objective is to strengthen the requirements of 3NF by dealing with certain


types of anomalies not addressed in 3NF while the rule states that for every
functional dependency (A → B), A should be a super key. This prevents non-super
key attributes from determining other attributes.

5. Fourth Normal Form (4NF).

✓ The objective for 4NF is to remove multi-valued dependencies while the rule is
that the table must be in BCNF, and it should not have any non-trivial multi-
valued dependencies.

4
6. Fifth Normal Form (5NF).

✓ The objective of 5NF is to decompose tables to eliminate redundancy caused by


join dependencies while the rule indicates that the table must be in 4NF, and
every join dependency needs to be a consequence of the candidate keys.

7. Domain-Key Normal Form (DKNF).

✓ The objective is to address all constraints on a table while the cardinal rule
states that, a table is in DKNF if every constraint on the table is a consequence of
the definition of keys and domains of the attributes.

Benefits of Normalization in DBMS.

✓ Data Integrity - Just like a neatly organized closet, a normalized database has
less redundant data, making it easier to find what you need.
✓ Data consistency - If you clean out your closet, it’s easier to see what you have.
Similarly, normalization helps keep your data accurate and reliable.
✓ Better relationship between tables - No large tables, small tables with a proper
relationship.
✓ More scalable design for tables - If you ever need to update something, you know
exactly where to go—no more searching through piles.
✓ Removing dependencies, like Partial Dependency, Transitive Dependency, Join
Dependency.

Challenges of Normalization in DBMS:

✓ Repeating data groups.


✓ Multiple use of the same attribute.
✓ Multiple occurrences of the same fact.
✓ Conflicting facts.
✓ Derived attributes.
✓ Missing information.
✓ Normalization can lead to reduced flexibility and data inconsistency.
✓ It may also result in data complexity, slow processing speed, and excess storage.

You might also like