0% found this document useful (0 votes)
12 views21 pages

Module 2 DB

A database is an organized electronic collection of data managed by a Database Management System (DBMS) that allows for efficient data storage, retrieval, and manipulation. Key components of a database include data, schema, DBMS, queries, and users, each playing a crucial role in database functionality and design. Database normalization is a process aimed at reducing data redundancy and ensuring data integrity through structured organization and adherence to specific rules.

Uploaded by

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

Module 2 DB

A database is an organized electronic collection of data managed by a Database Management System (DBMS) that allows for efficient data storage, retrieval, and manipulation. Key components of a database include data, schema, DBMS, queries, and users, each playing a crucial role in database functionality and design. Database normalization is a process aimed at reducing data redundancy and ensuring data integrity through structured organization and adherence to specific rules.

Uploaded by

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

DATABASE AND

ITS FUNCTIONS
Introduction to Databases
◦ A database is an electronically stored, systematic

What is a collection of data that can include words, numbers,


images, videos, and other types of files. Databases
are managed using specialized software called a
Database? Database Management System (DBMS), which
allows users to store, retrieve, and manipulate data
efficiently.
COMPONENTS OF A
DATABASE
1. Data
◦Data is the core component of any database,
representing the actual information stored. It can
include numbers, text, images, videos,
or documents, depending on the database’s purpose.
For instance, a customer database might store
customer names, addresses, and purchase histories
2. Schema
◦ The schema is the blueprint or
structure of the database. It defines
how data is organized and includes
details like tables, columns, data types,
and relationships between entities. For
example, a table in a customer
database might have columns like
CustomerID, Name, and Email. The
schema ensures consistency and helps
users understand how the database is
designed.
3. DBMS
◦ The DBMS is the software
layer that enables
interaction with the
database. It manages the
storage, retrieval, and
manipulation of data
while ensuring security
and data integrity.
Examples of DBMS
software include MySQL,
Oracle, and MongoDB.
The DBMS also handles
tasks like backup,
recovery, and query
optimization to maintain
the database’s
performance.
4. Queries
◦ Queries are commands used to interact
with the database, allowing users to
retrieve, manipulate, or update data. For
relational databases, SQL (Structured
Query Language) is commonly used.

◦ Queries are vital for extracting actionable


insights and managing data effectively.
5. Users
◦ Users are individuals or applications
that interact with the database. They
can have different levels of access
based on their roles, such as
administrators, developers, or end-
users. For example, a database
administrator might have full control,
including the ability to create or delete
tables, while a regular user might only
have permission to view specific data.
DATABASE DESIGN
◦ Set of procedures or
collection of tasks involving
What is various steps taken to
implement a database. A
database good database design is
design? important. It helps you get the
right information when you
need it.
Primary Terminologies Used in
Database Design
◦ Redundancy - Redundancy refers to the duplicity of the data. There can be specific use cases when we
need or don't need redundancy in our Database.
◦ Schema - Schema is a logical container that defines the structure & manages the organization of the data
stored in it. It consists of rows and columns having data types for each column.
◦ Records/Tuples - A Record or a tuple is the same thing, basically its where our data is stored inside a table
◦ Indexing - Indexing is a data structure technique to promote efficient retrieval of the data stored in our
database.
◦ Data Integrity & Consistency - Data integrity refers to the quality of the information stored in our database
and consistency refers to the correctness of the data stored.
◦ Data Models - Data models provide us with visual modeling techniques to visualize the data & the
relationship that exists among those data. Ex: model, Network Model, Object Oriented Model, Hierarchical
model, etc.
◦ Normalization - The process of organizing data to reduce redundancy and dependency by dividing larger
tables into smaller ones and defining relationships. It ensures data storage and consistency.
Primary Terminologies Used in
Database Design
◦ Functional Dependency - Functional Dependency is a relationship between two
attributes of the table that represents that the value of one attribute can be
determined by another. Ex: {A -> B}, A & B are two attributes and attribute A can
uniquely determine the value of B.
◦ Transaction - Transaction is a single logical unit of work. It signifies that some
changes are made in the database. A transaction must satisfy the ACID or BASE
properties (depending on the type of Database).
◦ Concurrency - Concurrency refers to allowing multiple transactions to operate
simultaneously without interfering with one another.
◦ Constraints - Constraints are the rules applied to fields in a table to enforce data
integrity. e.g., NOT NULL, UNIQUE, CHECK, etc. It ensures data quality and accuracy.
NORMALIZATION
Database Normalization
◦ It is a technique of organizing the data in the database.
◦ It is a systematic approach of decomposing tables to eliminate
data redundancy(repetition) and undesirable characteristics like
Insertion, Update and Deletion Anomalies.
◦ It is a multi-step process that puts data into tabular form,
removing duplicated data from the relation tables.
Problems without Normalization

◦Data Redundancy
◦Insertion Anomaly
◦Updation Anomaly
◦Deletion Anomaly
Data
Redundancy
Insertion
Anomaly
Update
Anomaly

Deletion
Anomaly
Normalization
Rule
◦ The First Normal Form – 1NF
◦ For a table to be in the first normal
form, it must meet the following
criteria:
- a single cell must not hold more
than one value (atomicity)
- there must be a primary key for
identification
- no duplicated rows or columns
- each column must have only one
value for each row in the table
Normalization
Rule
◦ The Second Normal Form – 2NF
◦ The 1NF only eliminates repeating
groups, not redundancy. That’s why
there is 2NF.
◦ A table is said to be in 2NF if it meets
the following criteria:
- it’s already in 1NF
- has no partial dependency.
That is, all non-key attributes
are fully dependent on a primary
key.
Normalization
Rule
◦ The Third Normal Form – 3NF
◦ When a table is in 2NF, it eliminates repeating
groups and redundancy, but it does not
eliminate transitive partial dependency.
◦ This means a non-prime attribute (an attribute
that is not part of the candidate’s key) is
dependent on another non-prime attribute.
This is what the third normal form (3NF)
eliminates.
◦ So, for a table to be in 3NF, it must:
- be in 2NF
- have no transitive partial dependency.
TABLES
What is a Table
in a Database?
◦collection of related
data in an organized
manner in the form of
rows and columns.

You might also like