Understanding Database Management Systems
Understanding Database Management Systems
What is Data?
Data is a collection of a distinct small unit of information. It can be used in a variety of forms like text,
numbers, media, bytes, etc. it can be stored in pieces of paper or electronic memory, etc.
What is Database
The database is a collection of inter-related data where data can be easily accessed, manage, and
update. It is also used to organize the data in the form of a table, schema, views, and reports, etc. They
support electronic storage and manipulation of data. Data base make data management easily.
For example: The college Database organizes the data about the students such as name, age, roll no,
department etc.
Using the database, you can easily retrieve, insert, and delete the information.
Database Management System
o Database management system is a software which is used to manage the database. For
example: MySQL, Oracle, etc are a very popular commercial database which is used in different
applications.
o DBMS provides an interface to perform various operations like database creation, storing data in
it, updating data, creating a table in the database and a lot more.
o It provides protection and security to the database. In the case of multiple users, it also
maintains data consistency.
Application of DBMS
Database Management Systems (DBMS) are used across various fields and applications to manage,
store, -and retrieve data efficiently. Here are some common and notable applications of DBMS:
1. Financial Services
o Banking Systems: Manages customer accounts, transactions, loans, and financial records.
Ensures data security and handles large volumes of transactional data.
2. Healthcare
o Electronic Health Records (EHR): Stores patient information, medical history, and treatment
plans, improving patient care and data accessibility.
o Hospital Management Systems: Manages patient admissions, billing, scheduling, and other
administrative tasks.
3. Education
o Student Information Systems: Manages student records, grades, course registrations, and
academic progress.
o Learning Management Systems (LMS): Stores course materials, student progress, and
assessments, facilitating online and blended learning environments.
4. E-Commerce
o Online Retail Platforms: Manages product listings, customer orders, inventory, and transactions,
providing a seamless shopping experience.
5. Government and Public Sector
o Citizen Databases: Manages records related to citizenship, taxation, and public services.
o Voting Systems: Stores and processes voting data to ensure accurate and fair elections.
6. Media and Entertainment
o Content Management Systems (CMS): Manages digital content such as articles, videos, and
images, facilitating content creation, publishing, and retrieval.
7. Travel and Hospitality
o Reservation Systems: Manages booking information for airlines, hotels, and rental services,
optimizing availability and customer experience.
DBMS allows users the following tasks:
o Data Definition: It is used for creation, modification, and removal of definition that defines the
organization of data in the database.
o Data Updation: It is used for the insertion, modification, and deletion of the actual data in the
database.
o Data Retrieval: It is used to retrieve the data from the database which can be used by
applications for various purposes.
o User Administration: It is used for registering and monitoring users, maintain data integrity,
enforcing data security, dealing with concurrency control, monitoring performance and
recovering information corrupted by unexpected failure.
Characteristics of DBMS
Traditionally data was organised in file formats, DBMS was a new concept that all the research was done
to make it overcome the deficiencies in a traditional style of data management. The modern DBMS has
the following characteristics
Less Redundancy: Data Redundancy occurs when the same piece of data is stored in multiple
places within the database. For example, storing a customer's address in multiple tables can
lead to inconsistencies if the address changes and is not updated everywhere. DBMS follows the
rules of normalization which splits a relation when any of its attributes is having redundancy in
values. Normalization is a mathematically rich and scientific process that reduces data
redundancy.
Consistency: Consistency refers to the quality of maintaining a uniform and reliable state across
various contexts. In databases, data consistency means that data is accurate and synchronized
across different systems or instances. It ensures that data is not contradictory and that updates
are reflected across all relevant locations.
Relation based tables: DBMS allows the entities(tables) and relation among them to form
tables. The user can understand the architecture of a database just by looking at the table
names
Real world entity: A modern DBMS is more realistic and use real world entities to design its
architecture. It uses the behaviour and attributes. For e.g., a college database may use the
students as an entity and their age as an attribute
Student
age
Query language: Query languages are specialized languages used to interact with databases.
They allow users to retrieve, manipulate, and manage data within a database. The most
prominent query language is SQL (Structured Query Language)
ACID properties: DBMS follows the concept of Atomicity, Consistency, Isolation and Durability.
These concepts are applied on transactions which manipulate data in the database. ACID
properties are essential for ensuring that a database maintains integrity and reliability in the
face of concurrent transactions, system failures, and other issues.
Multiuser and Con-current access : In a Database Management System (DBMS), multiuser and
concurrent access refer to the system’s ability to handle multiple users or processes accessing
the database simultaneously. These features are crucial for ensuring that a database can
support multiple users interacting with it at the same time, while maintaining data integrity and
consistency.
Multiple views: It refer to the capability to create different virtual representations or
perspectives of the same underlying data. These views are designed to simplify data access,
enhance security, and provide tailored data representations for different users or applications.
Advantages of DBMS
o Controls database redundancy: Data redundancy refers to the unnecessary duplication of data
within a database or system. It occurs when the same piece of data is stored in multiple places.
This can lead to several issues, including increased storage costs, potential inconsistencies, and
inefficiencies in data management. It can control data redundancy because it stores all the data
in one single database file and that recorded data is placed in the database.
o Data sharing: Data can be shared by authorised users of the organization among multiple users.
Many users can be authorised to access the same data simultaneously. In DBMS, the authorized
users of an organization can share the data among multiple users.
o Data Security: Data security is the protection of data base from un-authorised access, to ensure
security DBMS provides security such as giving usernames and passwords. Implements user
permissions and roles to control who can access or modify data, ensuring that sensitive
information is protected.
o Easily Maintenance: It can be easily maintainable due to the centralized nature of the database
system.
o Graphical User Interfaces (GUIs): Provides user-friendly interfaces for managing and interacting
with data, making it easier for non-technical users to perform tasks.
o Reduce time: It reduces development time and maintenance need.
o Minimized Duplication: Reduces the need for data duplication through normalization and
efficient data organization.
o Backup and Recovery: It provides backup and recovery subsystems which create automatic
backup of data from hardware and software failures and restores the data if required.
o multiple user interface: It provides different types of user interfaces like graphical user
interfaces, application program interfaces
Disadvantages of DBMS
o Cost of Hardware and Software: It requires a high speed of data processor and large memory
size to run DBMS software. High-performance databases may require expensive hardware or
cloud resources.
o Size: It occupies a large space of disks and large memory to run them efficiently.
o Complexity: Databases can be complex to set up and maintain. This includes tasks like schema
design, indexing, and managing relationships between tables.
o Higher impact of failure: Failure is highly impacted the database because in most of the
organization, all the data stored in a single database and if the database is damaged due to
electric failure or database corruption then the data may be lost forever.
o Challenges: Migrating data from one database system to another can be a complex and error-
prone process, often requiring careful planning and execution.
Users of data base
Database users can access the database and retrieve the data from the database using applications and
interfaces provided by the Database Management System (DBMS).
Database users in DBMS can be categorized based on their interaction with the databases. According to
the tasks performed by the database users on the databases, we can categorize them into seven
categories as follows:
Database Administrators (DBA)
Database Designers
System Analysts
Application Programmers / Back-End Developers
Naive Users / Parametric Users
Sophisticated Users
Casual Users / Temporary Users
Database Administrators (DBA): Database Administrators are the most important type of database
users in DBMS. Database Administrator is an individual or a team of users who defines the database
schema and takes charge of controlling various levels of the database within the organization. Database
Administrators (DBAs) have full control of the database and they are sometimes known as the super-
users of the database. They work alongside developers in order to discuss and design the overall
structure of the database including layouts, functionalities, workflow, etc. Database Administrators
(DBAs) can grant or revoke authorization permission to all other users at any point of time. In order to
access the database, DBAs have to provide login credentials (account ID and password) to all other users
when required. Database Administrators (DBAs) are solely responsible for providing security to the
database by restricting unauthorized users from accessing the database.
Database Designers: As the name suggests, Database Designers are the users in DBMS who design and
create the structure of the database including triggers, indexes, schemas, entity relationships, tables,
constraints,, etc. which complete the database. Database designers try to gather information depending
upon the requirements related to the database like the layout, looks, database functioning, costing,
technologies to be used & implementation techniques, and finally, they design the final layout of the
database for programmers to code its logic. Database Designers are the type of database users in DBMS
who are responsible for implementing the overall design of the database. They decide which form of
data needs to be stored, what kind of relations exist among different entities of the database, what will
be the type of attributes, etc.
System Analysts : System Analysts are the type of database users in DBMS who analyze the
requirements of Naive / Parametric End users. It is their responsibility to check whether all the
requirements of end users are satisfied or not.
Application Programmers / Back-End Developers : Application Programmers also known as Back-End
Developers, are computer professional users who are responsible for developing the application
programs (C, C++, Java, PHP, Python, etc.) or the user interface so that other users can use these
applications to interact with the database.
Application Programmers have deep knowledge of DBMS & databases and know everything in detail.
They interact with the database using DML (Data Manipulation Language) queries to store data inside
the database and when needed, they can also fetch the data from it.
Naive Users / Parametric Users: Naive users also known as Parametric End users, don't have any
knowledge of DBMS but still frequently use the database applications to get the desired results. With
the help of the interface provided by the DBMS applications, Naive users mostly use the database to fill
in or retrieve the information (view level of the database).
Sophisticated Users: Sophisticated users are the type of database users in DBMS who know DBMS (DDL
& DML commands) and are familiar with the database. Sophisticated users can be business analysts,
engineers, scientists, system analysts, etc.
Casual Users / Temporary Users: Casual users also known as temporary users, are the type of database
users in DBMS who frequently or occasionally use the database services. Whenever these users try to
access the database, they want all the information sorted in place. Casual/Temporary users have little
knowledge about DBMS and each time they try to access the database, they require new information.
COMPONENTS OF DBMS
There are many components available in the DBMS. Each component has a significant task in the DBMS.
The components are
Hardware
Software
Data
People/Users
Procedures
Data Access Language
Hardware: The h/w components play a crucial role in ensuring the system runs efficiently and
effectively. The hardware is the actual computer system used for storage and retrieval of the
database. This includes computers (PCs, workstations, servers and supercomputers), storage devices
(hard disks, magnetic tapes), network devices (hubs, switches, routers) and other supporting devices
for keeping and retrieval of data.
Software: DBMS s/w acts as a bridge between the user and the database. All requests from users for
access to the database are handled by the DBMS. Software is defined as the collection of programs
that are used to instruct the computer about its work. The software consists of a set of procedures,
programs, and routines associated with the computer system's operation and performance. Also, we
can say that computer software is a set of instructions that is used to instruct the computer
hardware for the operation of the computers. DBMS s/w consist of several s/w components that
handle various tasks such as data definition, data manipulation, data security, data integrity etc.
Data: It is the most important component of DBMS environment. The database contains operational
data and the meta data. For effective storage and retrieval of information, data is organized as
fields, records, and files.
Fields: A field is the smallest unit of stored data. Each field consists of data of a specific type
Records: A record is a collection of related fields.
File: A file is a collection of all occurrences of same type of records
Users :
Procedures: The procedure is a type of general instruction or guidelines for the use of DBMS. This
instruction includes how to set up the database, how to install the database, how to log in and log
out of the database, how to manage the database, how to take a backup of the database, and how
to generate the report of the database. The main purpose of the procedure is to guide the user
during the management and operation of the database.
Data Access Language: Data Access Language (DAL) in a Database Management System refers to
the set of commands used to interact with the data stored in the database. These commands allow
users to perform various operations such as querying, updating, inserting, and deleting data.
gives poor performance when there are a large number of users. 2-Tier Architecture is cheaper than 3-
Tier Architecture
3 Tier Architecture: In 3-Tier Architecture , there is another layer between the client and the server.
The client does not directly communicate with the server. Instead, it interacts with an application server
which further communicates with the database system and then the query processing and transaction
management takes place. This intermediate layer acts as a medium for the exchange of partially
processed data between the server and the client. This type of architecture is used in the case of large
web applications. 3-Tier Architecture Improves Security. This type of model prevents direct interaction
of the client with the server thereby reducing access to unauthorized data.
Data Models
Data Model in DBMS is the concept of tools that are developed to summarize the description of the
database. Data Models provide us with a transparent picture of data which helps us in creating an actual
database. It shows us from the design of the data to its proper implementation of data.
1. Hierarchical Database Model: It Is a way to organize data in a tree-like structure, where each record
has a single parent and can have multiple children.
Records: Basic units of data, organized in a tree format. Each record contains fields (attributes).
Parent-Child Relationship: Each parent record can link to multiple child records, but each child has only
one parent. This creates a hierarchy.
Root Record: The top-level record in the hierarchy, from which all other records descend.
Navigation: Data retrieval involves moving from parent to child, following the hierarchy.
The tree structure is easy to understand and navigate. Quick retrieval of data due to the predictable
paths through the hierarchy. Changes to the hierarchy (like adding new relationships) can be
complicated. Only supports one-to-many relationships; many-to-many relationships are difficult to
implement.
2. Network Model: It Is a way to organize data using a graph structure, where records are connected by
links.
Records: Basic units of data, like a row in a table.
Links: Connections between records that show how they relate to each other.
Sets: Groups of records linked together, defining relationships.
You find data by following links between records. Supports many-to-many connections easily. Can
quickly navigate through linked records. Can be difficult to understand and manage. Users need to know
how the data is linked to retrieve it effectively.
3. Relational Model
The relational model is a way to organize data in a database using tables. It helps store and manage
information efficiently, making it easy to retrieve and manipulate.
Key Components
Tables: Data is organized into tables, where each table represents a different type of entity (e.g.,
students, classes).Each table consists of rows (records) and columns (attributes).
Rows: Each row in a table represents a single entry or record. For example, a row in a Students table
could represent one student.
Columns :Each column represents a specific piece of information about the entity. For example, in a
Students table, columns might include Name, Age, and Grade.
Primary Key: Each table has a primary key, which is a unique identifier for each record. For instance,
Student ID could be the primary key in the Students table.
Foreign Key: A foreign key is a column that creates a link between two tables. It references the primary
key in another table, allowing for relationships between data. For example, a Class ID in a Students table
could link to a Classes table.
Relationships: Tables can be related to each other. For example, a student can be enrolled in multiple
classes, creating a many-to-many relationship that might require a separate table, like an Enrollments
table.
4. Entity-Relationship Model( ER Model):It is a diagrammatic way to represent data and its relationships
in a database.
Key Components
Entities: Objects or things in the real world that have a distinct existence (e.g., Student, Course).
Represented as rectangles in ER diagrams.
Attributes: Characteristics or properties of entities (e.g., Student ID, Name, Course Title). Represented as
ovals connected to their respective entities.
Relationships: Connections between entities that describe how they interact (e.g., Enrollment between
Student and Course). Represented as diamonds in ER diagrams.
Cardinality: Describes the number of instances of one entity that can be associated with instances of
another entity (e.g., one-to-many, many-to-many).
It mirrors real-world entities and their interactions, making it easier to understand and design.
It effectively manages complex data and relationships that traditional models might struggle with.
Registration
Student
Course
Keys
Primary Key: A primary key is a unique identifier for each record in a table. It ensures that no
two rows have the same value for the primary key attribute(s) and cannot contain null values.
For example, StudentID in the Student entity.
Characteristics:
1. Uniqueness: Each value must be unique within the table.
2. Non-nullable: A primary key cannot contain null values.
3. Immutable: Ideally, the value of a primary key should not change over time.
Foreign Key: A foreign key is an attribute (or a set of attributes) in one table that references the
primary key in another table. It establishes a link between the two tables and enforces
referential integrity.
Candidate Key: A Candidate Key is a column or set of columns that can uniquely identify a row
in a table. A table can have multiple candidate keys, but only one is chosen as the primary key.
All candidate keys must be unique and not null.
Symbols Used in ER Model
ER Model is used to model the logical view of the system from a data perspective which consists of
these symbols:
Rectangles: Rectangles represent Entities in the ER Model.
Ellipses: Ellipses represent Attributes in the ER Model.
Diamond: Diamonds represent Relationships among Entities.
Lines: Lines represent attributes to entities and entity sets with other relationship types.
Double Ellipse: Double Ellipses represent Multi-Valued Attributes.
Double Rectangle: Double Rectangle represents a Weak Entity.
Type of Attributes:
1. Simple (Atomic) Attributes
Definition: Simple attributes, also known as atomic attributes, cannot be further divided into smaller
parts. They represent a single value.
Example:
Name: A simple attribute where the value is a single string.
Age: A simple attribute where the value is a single integer.
2. Composite Attributes
Definition: Composite attributes are attributes that can be divided into smaller sub-parts, each
representing a distinct piece of information.
Example:
Address: A composite attribute that can be divided into Street, City, State, and ZIP Code.
Name: A composite attribute that can be divided into First Name and Last Name.
Name
First Last
Name
3. Derived Attributes
Definition: Derived attributes are attributes whose values can be derived from other attributes or
entities in the database. They are not physically stored but are computed based on other attributes.
Example:
Age: Can be derived from the Date of Birth attribute.
Full Name: Can be derived from combining First Name and Last Name.
4. Multi-Valued Attributes
Definition: Multi-valued attributes are attributes that can hold multiple values for a single entity
instance. They are used when an attribute can have more than one value.
Example:
Phone Numbers: A person might have multiple phone numbers (e.g., home, mobile, work).
Email Addresses: A person might have multiple email addresses.
5. Single-Valued Attributes
Definition: Single-valued attributes are attributes that can hold single value for a single entity instance.
Example:
Age: Age attribute is single-valued because each person can only have one age at a time.
Relationship
In a Database Management System (DBMS), relationships define how data in different tables or entities
interact with one another. Understanding these relationships is crucial for designing an efficient and
effective database. Here are the main types of relationships:
1. One-to-One (1:1) Relationship
Definition: A single record in Table A is related to a single record in Table B.
Example: A person and their passport. Each person has one passport, and each passport is
assigned to one person.
1 1
Person A Has Passport
1 n
Cc Places Order
Customer
3. Many-to-One (N:1) Relationship
Definition: This is essentially the inverse of the one-to-many relationship, where multiple
records in Table A relate to a single record in Table B.
Example: Many students belong to one college.
n 1
Cc Joined College
Students
n n
Cc Joined Courses
Students
Relational algebra
Relational algebra is a formal system for manipulating relations (tables) in a database. It consists of a set
of operations that take one or two relations as input and produce a new relation as output but don’t
change the actual data in the database. It I a relational intermediate language. Here are some of the key
operations in relational algebra:
Basic Operations
1. Select (σ): Filters rows based on a specified condition.
o Syntax: σ_condition(R)
o Example: σ_age>30(Employees) retrieves all employees older than 30.
2. Project (π): Selects specific columns from a relation.
o Syntax: π_column1, column2(R)
o Example: π_name, age(Employees) retrieves the names and ages of all employees.
3. Union (∪): Combines the tuples from two relations, removing duplicates.
o Syntax: R ∪ S
o Example: EmployeesA ∪ EmployeesB combines employees from two different branches.
4. Set Intersection(∩): Set Intersection in relational algebra is the same set intersection operation
in set theory.
o Syntax : R ∩ S
o EmployeesA ∩ EmployeesB display employees common from two different
branches
5. Set Difference (−): Retrieves tuples from one relation that are not in another.
o Syntax: R − S
o Example: EmployeesA − EmployeesB retrieves employees in branch A who are not in
branch B.
6. Cartesian Product (×): Combines all tuples from two relations.
o Syntax: R × S
o Example: Employees × Departments creates combinations of all employees with all
departments.
6. Join (⨝): Combines tuples from two relations based on a related attribute.
o Syntax: R ⨝ condition S
o Example: Employees ⨝ Departments retrieves tuples where employees belong to specific
departments.
7. Rename (ρ): Changes the name of a relation or its attributes.
o Syntax: ρ_newName(R) or ρ_newAttr1, newAttr2(R)
o Example: ρ(EmpList)(Employees) renames the Employees relation to EmpList.
Relational Calculus
Relational calculus is a non-procedural query language used in database systems, particularly in the
context of relational databases. It focuses on what data to retrieve rather than how to retrieve it. There
are two main forms of relational calculus:
1 .Tuple Relational Calculus (TRC): This form specifies queries using tuples. A TRC expression typically
looks like { T | P(T) }, where T is a tuple variable and P(T) is a predicate that defines the conditions tuples
must satisfy to be included in the result.
2. Domain Relational Calculus (DRC): This form focuses on the individual fields (domains) of tuples
rather than the tuples themselves. A DRC expression might look like { (a1, a2, ..., an) | P(a1, a2, ..., an) },
where a represents values from the domains of attributes.
o Integrity constraints are a set of rules. It is used to maintain the quality of information.
o Integrity constraints ensure that the data insertion, updating, and other processes have to be
performed in such a way that data integrity is not affected.
o Thus, integrity constraint is used to guard against accidental damage to the database.
1. Domain constraints
o Domain constraints can be defined as the definition of a valid set of values for an attribute.
o The data type of domain includes string, character, integer, time, date, currency, etc. The value
of the attribute must be available in the corresponding domain.
Example:
o The entity integrity constraint states that primary key value can't be null.
o This is because the primary key value is used to identify individual rows in relation and if the
primary key has a null value, then we can't identify those rows.
o A table can contain a null value other than the primary key field.
Example:
o In the Referential integrity constraints, if a foreign key in Table 1 refers to the Primary Key of
Table 2, then every value of the Foreign Key in Table 1 must be null or be available in Table 2.
Example:
4. Key constraints
o Keys are the entity set that is used to identify an entity within its entity set uniquely.
o An entity set can have multiple keys, but out of which one key will be the primary key. A primary
key can contain a unique and null value in the relational table.
Example:
Orders Table:
OrderID CustomerID OrderAmount
1001 1 250.00
1002 1 150.00
1003 2 300.00
Functional Dependency
The functional dependency is a relationship that exists between two attributes. It typically exists
between the primary key and non-key attribute within a table.
X → Y
The left side of FD is known as a determinant, the right side of the production is known as a dependent.
For example:
Assume we have an employee table with attributes: Emp_Id, Emp_Name, Emp_Address.
Here Emp_Id attribute can uniquely identify the Emp_Name attribute of employee table because if we
know the Emp_Id, we can tell that employee name associated with it.
Functional dependency can be written as:
Emp_Id → Emp_Name
We can say that Emp_Name is functionally dependent on Emp_Id.
Types of Functional dependency
Each column has atomic values (no lists or multiple values in a single column).
Each row is uniquely identified by the combination of StudentID and Course.
Key Points to Remember:
Atomic values: Each column must contain only one value per row.
No multiple entries in a single column.
1NF focuses on ensuring that the database table has a structure where each field contains a single,
indivisible value, thereby avoiding repeating groups and multi-valued attributes. This is the first step
toward organizing data in a way that is easier to manage and query.
Second Normal Form (2NF)
It is a level of normalization designed to eliminate certain types of redundancy and anomalies in
relational database design. To achieve 2NF, a database must satisfy the following two conditions:
Now, the ProductName is no longer part of the Orders table, which eliminates the partial dependency
and brings the database into 2NF.
By following these principles, you can improve data integrity, reduce redundancy, and make the
database more efficient for queries and updates.
Third Normal Form (3NF)
Third Normal Form (3NF) is a higher level of database normalization aimed at eliminating transitive
dependencies and ensuring that data is stored in a more efficient and logically consistent way.
To achieve 3NF, a table must meet the following conditions:
It must be in Second Normal Form (2NF): This means:
The table must first satisfy 1NF (atomic values, no repeating groups).
There must be no partial dependencies (i.e., all non-key attributes must depend on the entire primary
key).
It must not have transitive dependencies: A transitive dependency occurs when one non-key attribute
depends on another non-key attribute, rather than directly depending on the primary key.
What is a Transitive Dependency?
A transitive dependency exists when:
An attribute (say, C) depends on another attribute (B), and
B depends on the primary key (A).
Thus, C depends on A via B, creating an indirect dependency. This transitive dependency means that the
table structure is not fully normalized, and it could result in unnecessary redundancy.
In this table:
InstructorEmail is dependent on the Instructor, not the StudentID or CourseID.
This is a transitive dependency: InstructorEmail depends on Instructor, which depends on CourseID,
which depends on the StudentID.
Step 1: Break it into Student-Course and Instructor tables.
This ensures that 3NF is achieved, and there are no transitive dependencies. Each attribute now
depends directly on the primary key of its table.
Definition of BCNF:
A relation (table) is in Boyce-Codd Normal Form (BCNF) if, and only if, for every functional dependency
𝑋→𝑌, the set of attributes X (the determinant) must be a super key.
Functional Dependencies:
BookID → AuthorID, AuthorName, PublisherName, PublisherPhone
AuthorID → AuthorName (Each author has a unique name)
PublisherName → PublisherPhone (Each publisher has a unique phone number)
The primary key is BookID.
Problem: The dependency PublisherName → PublisherPhone violates BCNF because PublisherName is
not a superkey (the primary key is BookID).
Decomposing to BCNF:
To bring the table into BCNF, we decompose it into two tables:
Fourth Normal Form (4NF)
Fourth Normal Form (4NF) is a level of database normalization that builds on Boyce-Codd Normal Form
(BCNF) and aims to remove multivalued dependencies. 4NF specifically addresses scenarios where a
relation contains more than one independent multi-valued fact about an entity. These situations can
lead to redundancy and anomalies when inserting, updating, or deleting data.
A relation (table) is in Fourth Normal Form (4NF) if:
It is in Boyce-Codd Normal Form (BCNF), and
It has no multivalued dependencies.(A multivalued dependency occurs when one attribute (or set of
attributes) determines two or more independent sets of attributes. In a multivalued dependency, for
each value of the determining attribute, there can be multiple values for the dependent attributes, and
these dependent attributes are independent of each other.)
Example of Multivalued Dependency:
Consider the following Student-Subject-Interest table: