Self Doc DBMS
Self Doc DBMS
Database is a collection of related data and data is a collection of facts and figures that can be processed to
produce information.
Mostly data represents recordable facts. Data aids in producing information, which is based on facts. For
example, if we have data about marks obtained by all students, we can then concludeabout toppers and
average marks.
A database management system stores data in such a way that it becomes easier to retrieve,manipulate, and
produce information.
Characteristics
Traditionally, data was organized in file formats. DBMS was a new concept then, and all the research was done
to make it overcome the deficiencies in traditional style of data management.
A modern DBMS has the following characteristics −
• Real-world entity − A modern DBMS is more realistic and uses real-world entities to design its architecture.
It uses the behavior and attributes too. For example, a school database may use students as an entity and
their age as an attribute.
• Relation-based tables − DBMS allows entities and relations among them to form tables. Auser can
understand the architecture of a database just by looking at the table names.
• Isolation of data and application − A database system is entirely different than its data. A database is an
active entity, whereas data is said to be passive, on which the database works and organizes. DBMS also
stores metadata, which is data about data, to ease its own process.
• Less redundancy − 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 is a state where every relation in a database remains consistent.There exist
methods and techniques, which can detect attempt of leaving database in inconsistent state. A DBMS can
provide greater consistency as compared to earlier forms of data storing applications like file-processing
systems.
• Query Language − DBMS is equipped with query language, which makes it more efficient to retrieve and
manipulate data. A user can apply as many and as different filtering options asrequired to retrieve a set of
data. Traditionally it was not possible where file-processing system was used.
• ACID Properties − DBMS follows the concepts of Atomicity, Consistency, Isolation, and Durability normally
shortened as ACID. These concepts are applied on transactions, which manipulate data in a database. ACID
properties help the database stay healthy in multi-transactional environments and in case of failure.
• Multiuser and Concurrent Access − DBMS supports multi-user environment and allowsthem to access and
manipulate data in parallel. Though there are restrictions on transactions when users attempt to handle the
same data item, but users are always unaware of them.
• Multiple views − DBMS offers multiple views for different users. A user who is in the Salesdepartment will
have a different view of database than a person working in the Production department. This feature enables
the users to have a concentrate view of the database according to their requirements.
• Security − Features like multiple views offer security to some extent where users are unable to access data of
other users and departments. DBMS offers methods to impose constraints while entering data into the database
and retrieving the same at a later stage. DBMS offers many different levels of security features, which enables
multiple users to have different views with different features. For example, a user in the Sales department
cannot see the data that belongs to the Purchase department. Additionally, it can also be managed how much
data of the Sales department should be displayed to the user. Since a DBMS is not saved on the disk as
traditional file systems, it is very hard for miscreants to break the code.
DBMS - DATA MODELS
Data models define how the logical structure of a database is modeled. Data Models are fundamental entities to
introduce abstraction in a DBMS. Data models define how data is connected to each other and how they are processed
and stored inside the system.
The very first data model could be flat data-models, where all the data used are to be kept in the same plane. Earlier
data models were not so scientific, hence they were prone to introduce lots of duplication and update anomalies.
Entity-Relationship Model
Entity-Relationship ER Model is based on the notion of real-world entities and relationships among them. While
formulating real-world scenario into the database model, the ER Model creates entity set, relationship set, general
attributes and constraints.
• Entity − An entity in an ER Model is a real-world entity having properties called attributes. Every
attribute is defined by its set of values called domain. For example, in a school database, a student is
considered as an entity. Student has various attributes like name, age,class, etc.
• Relationship − The logical association among entities is called relationship. Relationshipsare mapped
with entities in various ways. Mapping cardinalities define the number of associations between two
entities.
Relational Model
The most popular data model in DBMS is the Relational Model. It is more scientific a model than others. This model
is based on first-order predicate logic and defines a table as an n-ary relation.
Entity
An entity can be a real-world object, either animate or inanimate, that can be easily identifiable.For example, in a
school database, students, teachers, classes, and courses offered can be considered as entities. All these entities have
some attributes or properties that give them their identity.
An entity set is a collection of similar types of entities. An entity set may contain entities with attribute sharing similar
values. For example, a Students set may contain all the students of a school; likewise a Teachers set may contain all the
teachers of a school from all faculties. Entitysets need not be disjoint.
Attributes
Entities are represented by means of their properties, called attributes. All attributes have values.For example, a
student entity may have name, class, and age as attributes.
There exists a domain or range of values that can be assigned to attributes. For example, a student's name cannot be a
numeric value. It has to be alphabetic. A student's age cannot benegative, etc.
Types of Attributes
• Simple attribute − Simple attributes are atomic values, which cannot be divided further. For example, a
student's phone number is an atomic value of 10 digits.
• Composite attribute − Composite attributes are made of more than one simple attribute. For example, a
student's complete name may have first_name and last_name.
• Derived attribute − Derived attributes are the attributes that do not exist in the physical database, but
their values are derived from other attributes present in the database. For example, average_salary in a
department should not be saved directly in the database, instead it can be derived. For another example,
age can be derived from data_of_birth.
• Single-value attribute − Single-value attributes contain single value. For example −
Social_Security_Number.
• Multi-value attribute − Multi-value attributes may contain more than one values. For example, a person
can have more than one phone number, email_address, etc.
These attribute types can come together in a way like –
• simple single-valued attributes.
• simple multi-valued attributes
• composite single-valued attributes
• composite multi-valued attributes
Entity-Set and Keys
Key is an attribute or collection of attributes that uniquely identifies an entity among entity set.
For example, the roll_number of a student makes him/her identifiable among students.
• Super Key − A set of attributes one or more that collectively identifies an entity in an entity set.
• Candidate Key − A minimal super key is called a candidate key. An entity set may have more than one candidate
key.
• Primary Key − A primary key is one of the candidate keys chosen by the database designer to uniquely identify
the entity set.
Relationship
The association among entities is called a relationship. For example, an employee works_at a
department, a student enrolls in a course. Here, Works_at and Enrolls are called relationships.
Degree of Relationship
The number of participating entities in a relationship defines the degree of the relationship.
• Binary = degree 2
• Ternary = degree 3
• n-ary = degree
Mapping Cardinalities
Cardinality defines the number of entities in one entity set, which can be associated with the number of
entities of other set via relationship set.
• One-to-one − One entity from entity set A can be associated with at most one entity ofentity set B and
vice versa.
• One-to-many − One entity from entity set A can be associated with more than one entities of entity set B
however an entity from entity set B, can be associated with at most one entity.
• Many-to-one − More than one entities from entity set A can be associated with at most oneentity of entity
set B, however an entity from entity set B can be associated with more than one entity from entity set A.
• Many-to-many − One entity from A can be associated with more than one entity from B and vice
versa
RELATION DATA MODEL
Relational data model is the primary data model, which is used widely around the world for data storage and
processing. This model is simple and it has all the properties and capabilities required to process data with
storage efficiency.
Concepts
Tables − In relational data model, relations are saved in the format of Tables. This format stores the relation
among entities. A table has rows and columns, where rows represents records and columns represent the
attributes.
Tuple − A single row of a table, which contains a single record for that relation is called a tuple.
Relation instance − A finite set of tuples in the relational database system represents relation instance. Relation
instances do not have duplicate tuples.
Relation schema − A relation schema describes the relation name tablename, attributes, and their names.
Relation key − Each row has one or more attributes, known as relation key, which can identify the row in the
relation table uniquely.
Attribute domain − Every attribute has some pre-defined value scope, known as attribute domain.
Constraints
Every relation has some conditions that must hold for it to be a valid relation. These conditions are called
Relational Integrity Constraints.
There are three main integrity constraints −
• Key constraints
• Domain constraints
• Referential integrity constraints
Key Constraints
There must be at least one minimal subset of attributes in the relation, which can identify a tuple uniquely. This
minimal subset of attributes is called key for that relation. If there are more than one such minimal subsets,
these are called candidate keys.
Key constraints force that −
• in a relation with a key attribute, no two tuples can have identical values for key attributes.
• a key attribute can not have NULL values.
Attributes have specific values in real-world scenario. For example, age can only be a positive integer. The same
constraints have been tried to employ on the attributes of a relation. Every attribute is bound to have a specific
range of values. For example, age cannot be less than zero and telephone numbers cannot contain a digit outside
0-9.
Referential integrity Constraints
Referential integrity constraints work on the concept of Foreign Keys. A foreign key is a key attribute of a relation
that can be referred in other relation.
Referential integrity constraint states that if a relation refers to a key attribute of a different or same relation, then
that key element must exist.
Difference between Fact Table and Dimension Table
A reality or fact table’s record could be a combination of attributes from totally different dimension tables. The Fact
Table or Reality Table helps the user to investigate the business dimensions that helps him in call taking to enhance
his business.
On the opposite hand, Dimension Tables facilitate the reality table or fact table to gather dimensions on that the
measures needs to be taken.
The main difference between fact table or reality table and the Dimension table is that dimension table contains
attributes on that measures are taken actually table.
Fact table contains the measuring of the Dimension table contains the attributes on that truth table
1.
attributes of a dimension table. calculates the metric.
4. Fact table forms a vertical table. While dimension table forms a horizontal table.
It is used for analysis purpose and decision While the main task of dimension table is to store the information
8.
making. about a business and its process.
Aggregate Fact Tables:
• Aggregate fact tables are a special kind of fact tables in a data warehouse which contains new metrics
which are been derived from one or more aggregate functions (COUNT, AVERAGE, MIN, MAX, etc.) or from
some specialized functions whose outputs are totally derived from a grouping of base data.
• Aggregates are basically summarization of the fact related data which are been used as a purpose to
improve the performance.
• These new metrics, called as “aggregate facts” or “summary statistics” are been stored and maintained in
database of the data warehouse in special fact table at the grain of the aggregation.
• In similar way, the corresponding dimensions are been rolled up and compressed to match the new grain
of the fact.
• These specialized tables are been used as an substitutions whenever possible for returning user queries.
The reason is the speed.
• Querying a neat aggregate table is much faster and uses less of the disk I/O than the base, atomic fact
table, especially when the dimensions are large as well.
• If you want to amaze your users then start adding the aggregates.
• Even you can use this technique in your operational systems as well, giving boost to the foundational
reports.
EXAMPLE:
EXAMPLE
Note that the junk dimension is always of type 0 (constant). The site's name has the word junk, usually after dim instead
of the end. The data type is consistent, that is, for the Y / N column, it is either bit or CHAR (1), but
neither INT nor VARCHAR (N) - my preference is CHAR (1). A junk dimension has not a business key.
Stacked dimension
A stacked dimension is a used where two or more dimensions are combined with an aspect:
0 Unknown Unknown
A stacked dimension has one or two attributes and is always SCD type 0 (no update).
We see many types and status columns: Product Type, Customer Status, Store Type, Security Type, Security Class, Broker
Type, etc. All the columns store to their respective dimensions because they are the properties of the dimension.
Deferred Dimension
When loading a fact record, a dimension record may not be ready yet. It is technically called an inferior member but is
often called as sensible dimension.
Distorted Dimension
A dimension that is used in many places is called a distorted dimension. A conformal dimension can be used in a single
database or multiple fact tables in multiple data warts or data warehouses.
Degenerate Dimension
A degenerate dimension happens when the dimension attribute is stored as part of a fact table, but not in a separate
dimension table. These dimensions are keys for which there is no other attribute. In a data warehouse, they are often used
as the result of a query to analyse the source of numbers that are collected in a report. We use these values to detect
transactions in an OLTP system.
Role-playing Dimension
A role-playing dimension is one where the same dimension key includes more than one foreign key in the fact table. For
example, a fact table contains foreign keys for both the ship date and delivery date. But the same dimension data attributes
are applied to every foreign key. So, we can join the same dimension table for both foreign keys. Here, the date dimension
is taking many roles to map the ship date and the delivery date.
Shrunken Dimension
A shrunken dimension is a subset of another aspect. For example, the order fact table includes a foreign key for the
product. The target fact table can add a foreign key to the product category, which is in the product table but less granular-
creating a small dimension table with a product category because its primary key is a way to deal with this situation of
many grains. If the product dimension is a snowflake, then there is a separate table for the product category, a shrunken
dimension.
Fixed Dimension
Static dimensions are not extracted from the real data source but created in the data warehouse context
A slowly changing dimension is a set of data attributes that change slowly over a period of time rather than changing
regularly e.g. address or name. These attributes can change over a period of time and that will get combined as a slowly
changing dimension. These dimension can be classified in types:[3]
Snowflake Schema: Snowflake Schema is also the type of multidimensional model which is used for data warehouse.
In snowflake schema, The fact tables, dimension tables as well as sub dimension tables are contained. This schema
forms a snowflake with fact tables, dimension tables as well as sub-dimension tables.
Fact Constellation Schema: The fact constellation schema is also a type of multidimensional model. The fact
constellation schema consists of dimension tables that are shared by several fact tables. The fact constellation schema
consists of more than one star schema at a time. Unlike the snowflake schema, the planetarium schema is not really
easy to operate, as it has multiple numbers between tables. Unlike the snowflake schema, the constellation schema, in
fact, uses heavily complex queries to access data from the database.
Star Vs Snowflake
S.NO Star Schema Snowflake Schema
In star schema, The fact tables and the While in snowflake schema, The fact tables, dimension tables as well
1.
dimension tables are contained. as sub dimension tables are contained.
While it takes more time than star schema for the execution of
4. It takes less time for the execution of queries.
queries.
5. In star schema, Normalization is not used. While in this, Both normalization and denormalization are used.
9. It has less number of foreign keys. While it has more number of foreign keys.
10. It has high data redundancy. While it has low data redundancy.
Snowflake Vs Fact
S.NO Snowflake Schema Fact Constellation
Snowflake schema contains the large central fact table, While in fact constellation schema, dimension tables are
1.
dimension tables and sub dimension tables. shared by many fact tables.
2. Snowflake schema saves significant storage. While fact constellation schema does not save storage.
The snowflake schema consists of one star schema at a Whereas the fact constellation schema consists of more
3.
time. than one star schema at a time.
Snowflake schema is easy to operate as compared to Fact constellation schema is not easy to operate as
6. fact constellation schema as it has less number of joins compared to snowflake schema as it has multiple number
between the tables. of joins between the tables.
In snowflake schema, to access the data from database While in fact constellation schema, to access the data from
7.
simple and less complex query is used. database heavier complex query is used.
Star Vs Fact
A star schema depicts each dimension with only one- While in this, dimension tables are shared by many fact
1.
dimension table. tables.
In star schema, tables can be maintained easily in While in fact constellation schema, tables cannot be
2.
comparison of fact constellation schema. maintained easily comparatively.
In star schema, simple queries are used to access data While in this, heavily complex queries are used to access
4.
from the database. data from the database.
Star schema is easy to operate as compared to fact While fact constellation schema is not easy to operate
5. constellation schema as it has less number of joins as compared to star schema as it has many joins
between the tables. between the tables.
Star schema uses less space as compared to fact While fact constellation schema uses more space
6.
constellation schema. comparatively.
OLTP stands for Online Transaction Processing. OLTP has the work to administer day-to-day transactions in any
organization. The main goal of OLTP is data processing not data analysis.
OLAP Examples
Any type of Data Warehouse System is an OLAP system. The uses of the OLAP System are described below.
• Spotify analyzed songs by users to come up with a personalized homepage of their songs and playlist.
• Netflix movie recommendation system.
OLTP Examples
An example considered for OLTP System is ATM Center a person who authenticates first will receive the amount first and
the condition is that the amount to be withdrawn must be present in the ATM. The uses of the OLTP System are
described below.
Data source Consists of historical data from various Databases. Consists of only operational current data.
Normalized In an OLAP database, tables are not normalized. In an OLTP database, tables are normalized (3NF).
The data is used in planning, problem-solving, and The data is used to perform day-to-day fundamental
Usage of data
decision-making. operations.
It serves the purpose to extract information for It serves the purpose to Insert, Update, and Delete
Purpose
analysis and decision-making. information from the database.
The OLAP database is not often updated. As a The data integrity constraint must be maintained in an
Update
result, data integrity is unaffected. OLTP database.
Backup and It only needs backup from time to time as The backup and recovery process is maintained
Recovery compared to OLTP. rigorously
The processing of complex queries can take a It is comparatively fast in processing because of simple
Processing time
lengthy time. and straightforward queries.
Operations Only read and rarely write operations. Both read and write operations.
With lengthy, scheduled batch operations, data is The user initiates data updates, which are brief and
Updates
refreshed on a regular basis. quick.
Nature of
The process is focused on the customer. The process is focused on the market.
audience
Database Design Design with a focus on the subject. Design that is focused on the application.
Productivity Improves the efficiency of business analysts. Enhances the user’s productivity.
DDL (Data Definition Language)
DDL or Data Definition Language actually consists of the SQL commands that can be used to define the database
schema. It simply deals with descriptions of the database schema and is used to create and modify the structure of
database objects in the database.
DDL is a set of SQL commands used to create, modify, and delete database structures but not data. These commands are
normally not used by a general user, who should be accessing the database via an application.
List of DDL Commands
DQL statements are used for performing queries on the data within schema objects. The purpose of the DQL Command
is to get some schema relation based on the query passed to it. We can define DQL as follows it is a component of SQL
statement that allows getting data from the database and imposing order upon it. It includes the SELECT statement.
This command allows getting the data out of the database to perform operations with it. When a SELECT is fired against
a table or tables the result is compiled into a further temporary table, which is displayed or perhaps received by the
program i.e. a front-end.
DQL Command
Update existing data within UPDATE table_name SET column1 = value1, column2 = value2
UPDATE WHERE condition;
a table
Normalization of DBMS
In database management systems (DBMS), normal forms are a series of guidelines that help to ensure that the design of
a database is efficient, organized, and free from data anomalies. There are several levels of normalization, each with its
own set of guidelines, known as normal forms.
Important Points Regarding Normal Forms in DBMS
• First Normal Form (1NF): This is the most basic level of normalization. In 1NF, each table cell should contain
only a single value, and each column should have a unique name. The first normal form helps to eliminate
duplicate data and simplify queries.
• Second Normal Form (2NF): 2NF eliminates redundant data by requiring that each non-key attribute be
dependent on the primary key. This means that each column should be directly related to the primary key,
and not to other columns.
• Third Normal Form (3NF): 3NF builds on 2NF by requiring that all non-key attributes are independent of
each other. This means that each column should be directly related to the primary key, and not to any other
columns in the same table.
• Boyce-Codd Normal Form (BCNF): BCNF is a stricter form of 3NF that ensures that each determinant in a
table is a candidate key. In other words, BCNF ensures that each non-key attribute is dependent only on the
candidate key.
• Fourth Normal Form (4NF): 4NF is a further refinement of BCNF that ensures that a table does not contain
any multi-valued dependencies.
• Fifth Normal Form (5NF): 5NF is the highest level of normalization and involves decomposing a table into
smaller tables to remove data redundancy and improve data integrity.
Normal forms help to reduce data redundancy, increase data consistency, and improve database performance. However,
higher levels of normalization can lead to more complex database designs and queries. It is important to strike a balance
between normalization and practicality when designing a database.
Advantages of Normal Form
• Reduced data redundancy: Normalization helps to eliminate duplicate data in tables, reducing the amount
of storage space needed and improving database efficiency.
• Improved data consistency: Normalization ensures that data is stored in a consistent and organized manner,
reducing the risk of data inconsistencies and errors.
• Simplified database design: Normalization provides guidelines for organizing tables and data relationships,
making it easier to design and maintain a database.
• Improved query performance: Normalized tables are typically easier to search and retrieve data from,
resulting in faster query performance.
• Easier database maintenance: Normalization reduces the complexity of a database by breaking it down into
smaller, more manageable tables, making it easier to add, modify, and delete data.
Overall, using normal forms in DBMS helps to improve data quality, increase database efficiency, and simplify database
design and maintenance.
First Normal Form
If a relation contain composite or multi-valued attribute, it violates first normal form or a relation is in first normal form
if it does not contain any composite or multi-valued attribute. A relation is in first normal form if every attribute in that
relation is singled valued attribute.
• Example 1 – Relation STUDENT in table 1 is not in 1NF because of multi-valued attribute STUD_PHONE. Its
decomposition into 1NF has been shown in table 2.
Example
• Example 2 –
ID Name Courses
------------------
1 A c1, c2
2 E c3
3 M C2, c3
• In the above table Course is a multi-valued attribute so it is not in 1NF. Below Table is in 1NF as there is no
multi-valued attribute
ID Name Course
------------------
1 A c1
1 A c2
2 E c3
3 M c2
3 M c3
Second Normal Form
To be in second normal form, a relation must be in first normal form and relation must not contain any partial dependency.
A relation is in 2NF if it has No Partial Dependency, i.e., no non-prime attribute (attributes which are not part of any
candidate key) is dependent on any proper subset of any candidate key of the table. Partial Dependency – If the proper
subset of candidate key determines non-prime attribute, it is called partial dependency.
• {Note that, there are many courses having the same course fee} Here, COURSE_FEE cannot alone decide the
value of COURSE_NO or STUD_NO; COURSE_FEE together with STUD_NO cannot decide the value of
COURSE_NO; COURSE_FEE together with COURSE_NO cannot decide the value of STUD_NO; Hence,
COURSE_FEE would be a non-prime attribute, as it does not belong to the one only candidate key
{STUD_NO, COURSE_NO} ; But, COURSE_NO -> COURSE_FEE, i.e., COURSE_FEE is dependent on
COURSE_NO, which is a proper subset of the candidate key. Non-prime attribute COURSE_FEE is dependent
on a proper subset of the candidate key, which is a partial dependency and so this relation is not in 2NF. To
convert the above relation to 2NF, we need to split the table into two tables such as :
Table 1 Table 2
STUD_NO COURSE_NO COURSE_NO COURSE_FEE
1 C1 C1 1000
2 C2 C2 1500
1 C4 C3 1000
4 C3 C4 2000
4 C1 C5 2000
• NOTE: 2NF tries to reduce the redundant data getting stored in memory. For instance, if there are 100
students taking C1 course, we don’t need to store its Fee as 1000 for all the 100 records, instead, once we
can store it in the second table as the course fee for C1 is 1000.
In the above relation, AB is the only candidate key and there is no partial dependency, i.e., any proper subset of AB doesn’t
determine any non-prime attribute.
X is a super key.
Y is a prime attribute (each element of Y is part of some candidate key).
Example 1: In relation STUDENT given in Table 4, FD set: {STUD_NO -> STUD_NAME, STUD_NO -> STUD_STATE,
STUD_STATE -> STUD_COUNTRY, STUD_NO -> STUD_AGE}
For this relation in table 4, STUD_NO -> STUD_STATE and STUD_STATE -> STUD_COUNTRY are true.
So STUD_COUNTRY is transitively dependent on STUD_NO. It violates the third normal form.
To convert it in third normal form, we will decompose the relation STUDENT (STUD_NO, STUD_NAME, STUD_PHONE,
STUD_STATE, STUD_COUNTRY_STUD_AGE) as: STUDENT (STUD_NO, STUD_NAME, STUD_PHONE, STUD_STATE,
STUD_AGE) STATE_COUNTRY (STATE, COUNTRY)
Consider relation R(A, B, C, D, E) A -> BC, CD -> E, B -> D, E -> A All possible candidate keys in above relation are {A, E, CD,
BC} All attributes are on right sides of all functional dependencies are prime.
Example 2: Find the highest normal form of a relation R(A,B,C,D,E) with FD set as {BC->D, AC->BE, B->E}
Step 1: As we can see, (AC)+ ={A,C,B,E,D} but none of its subset can determine all attribute of relation, So AC will be
candidate key. A or C can’t be derived from any other attribute of the relation, so there will be only 1 candidate key {AC}.
Step 2: Prime attributes are those attributes that are part of candidate key {A, C} in this example and others will be non-
prime {B, D, E} in this example.
Step 3: The relation R is in 1st normal form as a relational DBMS does not allow multi-valued or composite attribute. The
relation is in 2nd normal form because BC->D is in 2nd normal form (BC is not a proper subset of candidate key AC) and
AC->BE is in 2nd normal form (AC is candidate key) and B->E is in 2nd normal form (B is not a proper subset of candidate
key AC).
The relation is not in 3rd normal form because in BC->D (neither BC is a super key nor D is a prime attribute) and in B->E
(neither B is a super key nor E is a prime attribute) but to satisfy 3rd normal for, either LHS of an FD should be super key
or RHS should be prime attribute. So the highest normal form of relation will be 2nd Normal form.
For example consider relation R(A, B, C) A -> BC, B -> A and B both are super keys so above relation is in BCNF.
BCNF
BCNF (Boyce-Codd Normal Form) is just a advanced version of Third Normal Form. Here we have some additional rules
than Third Normal Form. The basic condition for any relation to be in BCNF is that it must be in Third Normal Form.
We have to focus on some basic rules that are for BCNF: