0% found this document useful (0 votes)
13 views83 pages

DBMSNotes

Uploaded by

sammaparween1992
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)
13 views83 pages

DBMSNotes

Uploaded by

sammaparween1992
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/ 83

DBMS

(Database Management System)

DBMS 1
What will we study?

• Introduction to data, database, Database system, DBMS


• Field, Record, Objects, Primary Key, Alternate key, Candidate key
• Advantages of using DBMS
• DDL (Data Definition Language) and DML (Data Manipulation Language)
• ER-Diagram
• Database Model: Network Model, Hierarchical Model, Relational database
model and Entity Relationship Model
• Concept of Normalization: 1NF, 2NF, 3NF
• Centralized Vs. Distributed Database
• Database Security
DBMS 2
Data

• Data refers to raw, unprocessed


facts and figures with or without
any meaning. It can be numbers,
text, images, or any other form of
input that hasn’t been interpreted
or analyzed. For example, a list of
DATA
temperatures recorded every hour
throughout a day is data.

DBMS 3
Why data is important ?

• Data helps in make better decisions.


• Data helps in solve problems by finding the reason
for underperformance.
• Data helps one to evaluate the performance.
• Data helps one improve processes.
• Data helps one understand consumers and the
market.
DBMS 4
What is information?

• Information is data that has been processed, organized, or


structured in a way that adds meaning or context. It helps in
making decisions or understanding a situation. For instance, if you
take the temperature data and calculate the average temperature
for the day, that average is information.
• In essence, data is the raw input, and information is the
meaningful output derived from processing that data.

DBMS 5
Examples of Data and Information

Example 1: Weather
– Data: Hourly temperature readings throughout a day: 15°C, 17°C, 20°C, 22°C, 21°C,
18°C, 16°C.
– Information: The average temperature for the day is 18.4°C, indicating a mild day.
Example 2: Sales
– Data: Sales figures for a week: $200, $450, $300, $500, $700, $650, $400.
– Information: The total sales for the week amount to $3,200, showing a steady increase in
sales over the week.
Example 3: Health
– Data: Daily step counts: 5,000, 7,200, 6,800, 10,000, 8,500, 9,000, 7,500.
– Information: The average daily step count is 7,714 steps, suggesting an active lifestyle.

DBMS 6
Flat File System

• Before database has come in use, people used to keep records in file base
or flat file system. A flat file system is a simple database system where data
is stored in a single table or file without any structured relationships between
records. Here are some common examples:
1. CSV Files: Comma-Separated Values files store tabular data in plain text. Each line in the file
represents a row in the table, and fields are separated by commas.
2. TXT Files: Plain text files can be used to store data in a simple, readable format. Each line
typically represents a single record.
3. TSV Files: Tab-Separated Values files are similar to CSV files but use tabs to separate fields
instead of commas

DBMS 7
Limitations of Flat File System

1. Data redundancy
2. Inconsistent data
3. Inefficient data retrieval
4. Poor Accessibility
5. No support for complex Queries

DBMS 8
Database

• A database is a structured collection of data that is


stored and managed to enable easy access, retrieval,
and manipulation.
• It organizes data in a way that allows for efficient
storage, querying, updating, and management.
• Databases can store various types of information, such
as text, numbers, and multimedia.
• They are used in various applications, from simple
personal data storage to complex enterprise systems. Database

DBMS 9
DBMS

• A Database Management System (DBMS) is


software that provides an interface for users and
applications to interact with databases.
• It manages the data, the database engine, and the
database schema to facilitate the organization,
storage, retrieval, and manipulation of data.

DBMS 10
Features of DBMS

• Data Storage and Retrieval


• Data Manipulation
• Data Security
• Data Integrity(accurate data)
• Backup and Recovery
DBMS 11
Objectives Of DBMS

• To provide huge storage or space for relevant data


• To allow easy access to the data for user
• To provide quick response to user request for any information or
data
• To allow updating of data in database
• To remove duplicate data
• To allow multiple users to access the database
• To allow the growth of database system
• To prevent data from unauthorized access
DBMS 12
Field

• In DBMS, a "field" (also known as a column or attribute)


is a single piece of data; it is a specific piece of
information within a record in a database table.
• Each field has a defined data type and holds a value for
each record in the table.

DBMS 13
Record

"record" (also known as a


row or tuple) is a complete
set of related data items,
typically associated with a
single entity, stored in a
table. Each record is made
up of fields (columns),
where each field represents
one piece of data related to
that entity.
DBMS 14
Objects

• “object" refers to an entity that can store data and


interact with the database system.
• Objects in databases include tables, views,
indexes, procedures, functions, triggers, and more.
• These objects are used to organize, store, retrieve,
and manipulate data within the database.

DBMS 15
Primary Key
• A primary key is a unique identifier for a
record in a database table.
• It ensures that each record within the table
can be uniquely identified by the key.
• Primary keys are a fundamental concept in
relational database design and are essential
for maintaining data integrity and establishing
relationships between tables.

DBMS 16
Characteristics of a Primary Key

• Uniqueness: Each value in the primary key column must be


unique. No two records can have the same primary key value.
• Non-null: A primary key must have a value for every record. Null
values are not allowed.
• Immutability: The values of the primary key should not change
over time. This stability ensures consistent identification of
records.
• Single or Composite: A primary key can be a single column or a
combination of multiple columns (composite key) that together
uniquely identify a record. DBMS 17
Alternate key
• An alternate key is a column or a set of
columns in a database table that could
have been chosen as the primary key
but was not.
• While it uniquely identifies records in
the table, it is not used as the primary
key.
• Instead, it serves as an additional
unique identifier.
DBMS 18
Characteristics of an Alternate Key

• Uniqueness: Each value in the alternate key


column must be unique.
• Non-null: Values in the alternate key column must
not be null.
• Not Primary Key: It is not the primary key, but it
can serve as an alternative way to uniquely identify
a record.
DBMS 19
Super Key

• A super key is any combination of columns (attributes) in a database table


that can uniquely identify each row in that table.
• The purpose of a super key is to ensure that no two rows (records) are
identical based on the values of those columns.
• Key Characteristics of a Super Key:
1. Uniqueness: A super key must uniquely identify each row in the table.
This means that no two rows can have the same values for the columns
that make up the super key.
2. Redundancy: A super key may contain additional columns that are not
necessary to uniquely identify a row. In other words, it can have extra
columns beyond what is needed for unique identification.
DBMS 20
Example of a Super Key

StudentID Name Email PhoneNumber The PhoneNumber column is a super key because
1 [email protected]
9876543210 every student has a unique phone number.
2 Agastya [email protected]
9876543211 4. {StudentID, Name}:
3 Ravi [email protected]
9876543212 This combination is a super key because
StudentID already uniquely identifies each student.
However, it includes an additional column (Name),
Possible Super Keys in the Students Table: making it a redundant super key.
1. {StudentID}:
The StudentID column by itself is a super key 5{Email, Name}:
because it uniquely identifies each student. This combination is also a super key because
2. {Email}: Email alone is unique, but adding Name is
The Email column is also a super key because redundant.
every student has a unique email address.
3. {PhoneNumber}:

DBMS 21
Candidate key

• A candidate key is a minimal super key, meaning it has no unnecessary attributes. It is the smallest
possible combination of columns that can uniquely identify each row. For example:
• {StudentID} is a candidate key because it is the minimal set needed to uniquely identify a student.
• {Email} is another candidate key.
• {StudentID, Name} is not a candidate key because Name is redundant (it is not needed to ensure
uniqueness).

Characteristics of Candidate Keys:


• Uniqueness
• Minimality: A candidate key should be minimal, meaning that if any attribute is removed, it no longer
uniquely identifies a row.

DBMS 22
Composite Key

• A composite key is a type of candidate key that consists of two or more columns (attributes) that
together uniquely identify a row in a table. Unlike a simple candidate key, which is made up of just one
column, a composite key uses multiple columns to achieve uniqueness.

Key Characteristics of a Composite Key:


• Multiple Attributes: A composite key is always made up of two or more attributes.
• Uniqueness: The combination of values in the composite key must be unique across all rows in the
table.
• Minimality: Each attribute in the composite key contributes to its uniqueness. If you remove any
attribute from the composite key, it should no longer be unique.

DBMS 23
Example of Composite Key

• Let's consider a StudentCourses table that stores the courses taken by students.

StudentID CourseID EnrollmentDate


1 C001 1/15/2024
1 C002 2/10/2024
2 C001 1/18/2024
2 C003 2/20/2024
In this table,
• The StudentID alone cannot uniquely identify a row because a student can enroll in multiple courses.
• The CourseID alone cannot uniquely identify a row because multiple students can enroll in the same
course.
• However, the combination of StudentID and CourseID together forms a composite key. This
combination uniquely identifies each.
• So, {StudentID, CourseID} is a composite key.
DBMS 24
Foreign Key

• A foreign key is an attribute (or a StudentID Name Email


set of attributes) in one table that 1 Sambriddhi [email protected]
references the primary key of 2 Agastya [email protected]
another table.
• It is used to establish and enforce a EnrollmentID CourseID StudentID

link between the data in the two 101 C001 1

tables. The foreign key ensures 102 C002 2

referential integrity within the


In this case:
database. • StudentID in the Students table is a primary
• Consider two tables: Students and key.
• StudentID in the Enrollments table is a
Enrollment. foreign key that references StudentID in the
DBMS Students table. 25
Advantages of using DBMS

• Data Security: A Database Management System (DBMS)


provides a better platform for data privacy and security
policies thus, helping companies to improve Data Security.
• Data integration: Due to the Database Management
System we have access to well-managed and synchronized
forms of data thus it makes data handling very easy and
gives an integrated view of how a particular organization is
working.
DBMS 26
Advantages of using DBMS

• Data abstraction: The major purpose of a database system is to


provide users with an abstract view of the data. That is system
hides certain details of how the data are stored and miaintained.
• Reduction in data Redundancy: When working with a structured
database, DBMS provides the feature to prevent the input of
duplicate items in the database.
• Data sharing: A DBMS provides a platform for sharing data
across multiple applications and users, which can increase
productivity and collaboration.
DBMS 27
Advantages of using DBMS

• Data consistency and accuracy: DBMS ensures that data is


consistent and accurate by enforcing data integrity constraints
and preventing data duplication.
• Efficient data access and retrieval: DBMS allows for efficient
data access and retrieval by providing indexing and query
optimization techniques that speed up data retrieval.
• Scalability and flexibility: DBMS is highly scalable and can
easily accommodate changes in data volumes and user
requirements.
DBMS 28
Disadvantage of using DBMS

• Increased Cost: Cost of Hardware and Software,Cost of


Staff Training
• Complexity
• Performance
• Frequency Upgrade/Replacement Cycles
• Complex design

DBMS 29
E-R Diagram

• Before going to E-R Diagram lets understand E-R Model

ER-Model
• The ER-Model (Entity-Relationship Model) is a high-level conceptual data
model used for designing databases.
• It is a diagram that represents relationships among entities in a database.
• The ER model serves as a blueprint for the design of a database, helping
database designers to understand the organization of data before
implementing it in a relational database.

DBMS 30
E-R Diagram
Key Concepts of ER-Model

1. Entity:
An entity represents an object or a thing in the real world that has a distinct
existence. For example, in a university database, entities could be Student,
Course, Professor, etc.
2. Entity Set:
An entity set is a collection of similar entities. For example, all students in a
university form the Student entity set.
3. Attribute:
Attributes are properties or characteristics of an entity. Each attribute represents
a piece of data about the entity.
DBMS 31
E-R Diagram
Key Concepts of ER-Model

4. Relationship:
• A relationship describes how entities are related to one another.
For example, a Student entity may be related to a Course entity
through an Enrolls relationship, indicating that a student enrolls in
a course.
• There are three types of relationship
– One to one relationship
– One to many relationship
– Many to may relationship
. DBMS 32
E-R Diagram
Key Concepts of ER-Model

• One to one relationship


If one record of an entity is related with only on record of another entity then
such type of relationship is called one to one relationship.

DBMS 33
E-R Diagram
Key Concepts of ER-Model

• One to Many relationship


– If one instance of an entity is related with many instances of other entity
then such type of relationship is called one to many relationship.

DBMS 34
E-R Diagram
Key Concepts of ER-Model

• Many to Many relationship


– If many instances of an entity is related with many instances of other entity
then such type of relationship is called one to many relationship.

DBMS 35
E-R Diagram
• E-R Diagram(Entity-Relationship Diagram) Symbols used in ER-Diagram

• The E-R Diagram is a graphical


representation of the ER Model.
• It uses symbols to represent entities,
attributes, and relationships, making it
easier to visualize the data structure.

DBMS 36
ER-Diagram (Examples)

DBMS 37
Database Model

• A database model is a framework that determines how data is


stored, organized, and manipulated within a database.
• It essentially defines the logical structure of a database and the
relationships between different data elements.

DBMS 38
Hierarchical Model

• The hierarchical Model is one of the oldest models in the


data model which was developed by IBM, in the 1950s.
• In a hierarchical model, data are viewed as a collection of
tables, or we can say segments that form a hierarchical
relation.
• In this, the data is organized into a tree-like structure where
each record consists of one parent record and many children.
• We call the illogical associations as directional associations.
DBMS 39
Hierarchical Model

DBMS 40
Features Hierarchical Model

• Tree like structure


• 1:1 or 1:M relationship
• one parent have many children but one child must not
have no more than one parent

DBMS 41
Limitation of Hierarchical Model
• Complexity in Relationships: The hierarchical model is based on a tree
structure, where each record has a single parent.
• Rigidity: The structure of a hierarchical database is rigid, meaning that
changes in the data structure can be complex and costly.
• Redundancy: Since each child node can only have one parent, the
hierarchical model can lead to redundancy when the same data needs to be
associated with multiple parent records.
• Difficult Navigation: To retrieve data in a hierarchical database, you often
need to navigate through the entire tree structure, which can be time-
consuming and inefficient, especially for large databases.

DBMS 42
Network Model

• The Network Model was formalized by the Database Task group


in the 1960s.
• This model is the generalization of the hierarchical model.
• This model can consist of multiple parent segments and these
segments are grouped as levels but there exists a logical
association between the segments belonging to any level.
• Mostly, there exists a many-to-many logical association
between any of the two segments.
DBMS 43
Network Model

DBMS 44
Features of Network Model
• Graph Structure: The network model uses a graph structure to represent
data. It consists of nodes (also called records) and edges (also called sets)
that define the relationships between nodes.
• Many-to-Many Relationships: The network model allows many-to-many
relationships between records, which is one of its most significant
advantages over the hierarchical model.
• Data Independence: The network model provides a degree of data
independence, allowing the physical storage of data to be separated from its
logical representation.
• Efficient Data Retrieval: The use of pointers and predefined relationships
allows for efficient data retrieval.
DBMS 45
Limitation of Network Model
• Complexity: The network model is more complex to design, implement, and
maintain compared to other database models, such as the relational model.
• Difficult Navigation and Querying: The explicit use of pointers requires that
users have a good understanding of the database structure to navigate and
query the data effectively.
• Maintenance Overhead: The complexity of the network model increases the
maintenance overhead.
• Learning Curve: The network model has a steep learning curve for
database designers and users.

DBMS 46
Relational Database Model

DBMS 47
Relational Database Model

• E.F. Codd proposed the relational Model to model data in


the form of relations or tables.
• After designing the conceptual model of the Database
using ER diagram, we need to convert the conceptual
model into a relational model which can be implemented
using any RDBMS language like Oracle SQL, MySQL,
etc.

DBMS 48
Features of relational database

• Table-Based Structure: The relational model organizes data into tables


(also called relations), where each table consists of rows (records or tuples)
and columns (attributes or fields).
• Data Independence: The relational model provides a high degree of data
independence, meaning that changes to the database schema (e.g., adding
or modifying tables, columns) can be made without affecting the existing
application programs.
• Primary Keys: Each table in a relational database has a primary key, which
is a unique identifier for each record in the table.

DBMS 49
Limitation of Relational
database
• Complexity in Handling Unstructured Data: The relational
model is designed to handle structured data organized in tables.
• Scalability Issues: Relational databases can face challenges
when scaling horizontally (across multiple servers).
• Performance Bottlenecks: As the volume of data grows,
relational databases can experience performance bottlenecks.
• Cost of Scaling and Maintenance: As relational databases grow
in size and complexity, the cost of scaling, maintaining, and
optimizing them can increase significantly.
DBMS 50
Schema And Instances

• A schema is the structure of a database which defines name of tables ,data


fields with data types, relationships and constraints. For example let us
consider a table results:
Schema for table Result:

DBMS 51
Schema And Instances

• Instances for table results:

DBMS 52
Centralized Vs. Distributed
Database
• A centralized database, as the name suggests, is a
single database system that stores and manages all the
data in one location. It is typically hosted on a single
server or a cluster of servers within a single physical
location.
• A distributed database, on the other hand, is a database
system that stores and manages data across multiple
physical locations or servers.
DBMS 53
Difference between centralized and
distributed database
S.N centralized Database Distributed Database

It is a database that is stored, located as It is a database that consists of multiple databases


1 well as maintained at a single location which are connected with each other and are spread
only. across different physical locations.
The data access time in the case of
The data access time in the case of multiple users is
2 multiple users is more in a centralized
less in a distributed database.
database.

3 A centralized database is less costly. This database is very expensive.

The response speed is more in The response speed is less in comparison to a


4
comparison to a distributed database. centralized database.
The users cannot access the database in In a distributed database, if one database fails users
5
case of database failure occurs. have access to other databases. 54
DBMS
DDL Commands

– Create:This command is used to create a new table in SQL.


– Alter :This command is used to add, delete or change columns in the
existing table.
– truncate:This command is used to remove all rows from the table, but the
structure of the table still exists.
– drop:This command is used to remove an existing table along with its
structure from the Database.
– Rename :It is possible to change name of table with or without data in it
using simple RENAME command.

DBMS 55
DDL (Data Definition Language)

• Data Definition Language(DDL) is a subset of


SQL and a part of DBMS(Database Management
System).
• DDL consist of Commands to commands like
CREATE, ALTER, TRUNCATE and DROP. These
commands are used to create or modify the tables
in SQL.
DBMS 56
DML (Data Manipulation
Language)
• The SQL commands that deal with the manipulation of
data present in the database belong to DML or Data
Manipulation Language and this includes most of the SQL
statements.
• It is the component of the SQL statement that controls
access to data and to the database.

DBMS 57
DML commands

S.N Command Description


1 INSERT Insert data to table

2 UPDATE Update existing data within a table

3 DELETE Delete record from a database table

DBMS 58
Difference between DDL and
DML
S.N DDL DML
1 It stands for Data Definition Language. It stands for Data Manipulation Language.

2 It basically defines the column (Attributes) of the It adds or updates the row of the table. These
table. rows are called tuples.

3 Basic commands present in DDL are CREATE, BASIC commands present in DML are
DROP, RENAME, ALTER, etc. UPDATE, INSERT, MERGE etc.

4 DDL is used to define the structure of a DML is used to manipulate the data within the
database. database.

5 DDL statements are typically executed by DML statements are typically executed by
database administrators. application developers or end-users.
59
Database Security

• Database security is the overall system of tools and


processes used to secure and protect sensitive,
confidential data from both intentional threats and
accidental misuse.

DBMS 60
Database Security

• Physical security : Databases can be located either on


the business’s property in physical servers or digitally in
the cloud. Regardless of where the information lives, you
should always confirm that the servers are in a secure,
climate-controlled space.

DBMS 61
Database Security

• Access controls :Not every user should have access to


everything in the database. In fact, you should operate on
a minimum number approach – who actually needs to
have access to this information? Permission levels should
be set on a per user basis and continually reviewed for
ongoing security.

DBMS 62
Database Security

• Encryption :All data should be protected using the


highest level of encryption possible, both while it’s being
stored on the server and when it’s being used across the
network.
• Software and application security :Any applications or
software that are connected to the database should also
be periodically updated with the latest security features.

DBMS 63
Database Security

• Backups :No matter the type of database you have,


always have backups of its information on a separate
network and server.

DBMS 64
Concept of Normalization: 1NF,
2NF, 3NF
• Normalization is the process of organizing the data in the database.
• Normalization is used to minimize the redundancy from a relation or set
of relations.
• It is also used to eliminate undesirable characteristics like Insertion, Update,
and Deletion Anomalies.
• Normalization divides the larger table into smaller and links them using
relationships.
• The normal form is used to reduce redundancy from the database table.

DBMS 65
1NF

• The table should have atomic (indivisible) values; no


multi-valued or composite attributes.
• Each column contains unique values, and each record
has a unique identifier (typically a primary key).
• The order in which data is stored does not matter.

DBMS 66
1NF (Example)

• Suppose a company wants to store names and contact of its employee.


Table looks like:

Here in the given table, two employees Ram and Shayam have two mobile
numbers. This table in not in 1NF as rule says that each table attribute must
have atomic value and attribute must be dependent on primary key.

DBMS 67
1NF (Example)

• So to make the above table to be in 1NF, we should have data like this:

DBMS 68
2NF

• The table must be in 1NF.


• All non-key attributes must be fully functionally dependent
on the entire primary key (no partial dependency).
• If a table has a composite key, no non-key column should
depend on only part of the key.

DBMS 69
3NF

• The table must be in 2NF.


• There should be no transitive dependency; non-key
columns must depend only on the primary key.
• If a non-key attribute depends on another non-key
attribute, this dependency should be removed.

DBMS 70
Question Of Normalization

• UnNormalized Table
Teacher Subject Age Address

Ram Math,Physics 28 Jhapa

Gita English 29 pokhara

Hari Nepali 30 Kathmandu

DBMS 71
1NF

1.All the attributes Teacher Subject Age Address

should be Ram Physics 28 Jhapa

atomic. RAM Math 28 Jhapa

2.There should Gita English 29 pokhara

not repeated Hari Nepali 30 Kathmand


group. u

DBMS 72
2NF
t_ID Teacher Age Address
1.Table should be in 1NF 1 Ram 28 Jhapa
2 Gita 29 Pokhara
2.Introduction of primary
3 Hari 30 Kathmandu
and foregin key to
eliminate functional t_id Subjects
1 Math
dependency. 1 Physics
3.there exit transitive 2 English
functional 3 Nepali

dependency. in 2NF.
DBMS 73
3NF

t_ID Teacher Age Address


1.Table should be in 2NF. 1 Ram 28 Jhapa
2.3NF should remove 2 Gita 29 Pokhara
3 Hari 30 Kathmandu
transitive functional
dependency t_id Subjects
1 Math
s_ID Subject 1 Physics
A math 2 English
B Physics 3 Nepali
C English
D Nepali
DBMS 74
Database Administrator (DBA)

• A Database Administrator (DBA) is a professional responsible for


managing, maintaining, and securing a database system.
• The DBA ensures that the database is always available, performs
optimally, and meets the organization's requirements.
• They are key players in managing the organization's data
resources and play a crucial role in ensuring the integrity,
availability, and security of the data.

DBMS 75
Qualities of DBA

1. He/she should have sound and complete knowledge about


DBMS and its operation.
2. He/she should be familiar with several DBMS packages such as
MS Access, MY SQL, Oracle etc
3. He/she should have depth knowledge about the OS in which
database server is running.
4. He/she should have good understanding of network
architecture.
5. He/she should have good database designing skill.
DBMS 76
Roles Of DBA

1. Database Design and Implementation:


Design database structures and schemas to meet business needs, and implement them effectively.
2. Performance Monitoring and Optimization:
Monitor database performance, identify bottlenecks, and optimize queries and indexes for efficiency.
3. Security and Access Management:
Implement security measures, manage user roles and permissions, and ensure data protection.
4. Backup and Recovery:
Develop and execute backup strategies, and ensure reliable data recovery in case of failure.
5. Maintenance and Troubleshooting:
Perform regular database maintenance and resolve technical issues to ensure smooth operation.
6. Capacity Planning and Scalability:
Plan for future growth by managing storage, hardware, and software resources efficiently.

DBMS 77
Some Important terms

Data dictionary:
• A data dictionary is a file which contains meta-data that is
data about data. It also called information system
catalogue.
• It keeps all the data information about the database
system such as location, size of the database, tables,
records, fields, user information, recovery system, etc.
DBMS 78
Some Important terms

Data Integrity:
• Data integrity refers to the accuracy, consistency, and
reliability of data throughout its lifecycle.
• It ensures that data is complete, accurate, and maintained
in a way that prevents unauthorized access, accidental or
intentional corruption, and loss.

DBMS 79
Some Important terms

Data Integrity can be categorized into three types:


1. Domain integrity constraints: it defines a set range of
data values for given specific data field. And also
determines whether null values are allowed or not in the
data field.

DBMS 80
Some Important terms

3.Referential integrity constrains: It exists in a


relationship between the two tables in a database. It
ensures that the relationship between the primary keys in
the master table and foreign key in child table are always
maintained

DBMS 81
Some Important terms

2. Entity integrity constraints: It specify that all rows in a


table have a unique identifier, known as the primary key
value and it never be null i.e. blank.

DBMS 82
END Of Slide

DBMS 83

You might also like