UNIT III: Relational Database
Management System
Relational Data Base Management System: Concept of RDBMS, Its Characteristics
And Advantages, Codd’s 12 Rules, Database Security, Introduction To RDBMS.
Concept of RDBMS
 Characteristics of Relational Database Model
 1. Each relation in a database must have a distinct or unique name which would
separate it from the other relations in a database
 2. A relation must not have two attributes with the same name. Each attribute must
have a distinct name.
 3. Duplicate tuples must not be present in a relation.
Concept of RDBMS
 Characteristics of Relational Database Model
 4. Each tuple must have exactly one data value for an attribute.
 5. Tuples in a relation do not have to follow a significant order as the relation is not order-sensitive.
 6. Similarly, the attributes of a relation also do not have to follow certain ordering, it’s up to the
developer to decide the ordering of attributes.
Advantages of RDBMS
Advantages of RDBMS
1. Simple Model
A Relational Database system is the most simple model, as it does not require any complex
structuring or querying processes. It doesn’t involve tedious architectural processes like
hierarchical database structuring or definition. As the structure is simple, it is sufficient to be
handled with simple SQL queries and does not require complex queries to be designed.
2. Data Accuracy
In the relational database system, there can be multiple tables related to one another with the
use of a primary key and foreign key concepts. This makes the data to be non-repetitive. There
is no chance for duplication of data. Hence the accuracy of data in the relational database is
more than any other database system.
Advantages of RDBMS
3. Easy Access to Data
In the Relational Database System, there is no pattern or pathway for accessing the data, as to
another type of databases can be accessed only by navigating through a tree or a hierarchical
model. Anyone who accesses the data can query any table in the relational database.
4. Data Integrity
Data integrity is a crucial characteristic of the Relational Database system. Sturdy Data entries
and legitimacy validations ensure that all the Data in the database confines within suitable
arrangements and the data necessary for creating the relationships are present. This relational
reliability amongst the tables in the database helps in avoiding the records from being
imperfect, isolated or unrelated.
Advantages of RDBMS
5. Flexibility
A Relational Database system by itself possesses qualities for leveling up, expanding for bigger
lengths, as it is endowed with a bendable structure to accommodate the constantly shifting
requirements. This facilitates the increasing incoming amount of data, as well as the update and
deletes wherever required.
6. Normalization
The methodical style is maintained for making sure of a relational database structure is liberated
of any variances that can make a difference in the integrity and accuracy of the tables in the
database. A normalization process provides a set of regulations, characteristics, and purposes
for the database structure and evaluation of a relational database model.
Advantages of RDBMS
 7. High Security:
As the data is divided amongst the tables of the relational database system, it is
possible to make a few tables to be tagged as confidential and others not. This
segregation is easily implemented with a relational database management system,
unlike other databases.
 8. Feasible for Future Modifications:
As the relational database system holds records in separate tables based on their
categories, it is straightforward to insert, delete or update records that are subjected
to the latest requirements. This feature of the relational database model tolerates the
newest requirements that are presented by the business
Codd's 12 Rules
 Dr Edgar F. Codd, after his extensive research on the Relational Model of
database systems, came up with twelve rules of his own, which according to him,
a database must obey in order to be regarded as a true relational database.
 These rules can be applied on any database system that manages stored data
using only its relational capabilities. This is a foundation rule, which acts as a base
for all the other rules.
Codd's 12 Rules
 Rule 1: Information Rule
The data stored in a database, may it be user data or metadata, must be a value of
some table cell. Everything in a database must be stored in a table format.
 Rule 2: Guaranteed Access Rule
Every single data element (value) is guaranteed to be accessible logically with a
combination of table-name, primary-key (row value), and attribute-name (column
value). No other means, such as pointers, can be used to access data.
 Rule 3: Systematic Treatment of NULL Values
The NULL values in a database must be given a systematic and uniform treatment. This
is a very important rule because a NULL can be interpreted as one the following − data
is missing, data is not known, or data is not applicable.
Codd's 12 Rules
 Rule 4: Active Online Catalog
The structure description of the entire database must be stored in an online catalog,
known as data dictionary, which can be accessed by authorized users. Users can use
the same query language to access the catalog which they use to access the database
itself.
 Rule 5: Comprehensive Data Sub-Language Rule
A database can only be accessed using a language having linear syntax that supports
data definition, data manipulation, and transaction management operations. This
language can be used directly or by means of some application. If the database allows
access to data without any help of this language, then it is considered as a violation.
 Rule 6: View Updating Rule
All the views of a database, which can theoretically be updated, must also be
updatable by the system.
Codd's 12 Rules
 Rule 7: High-Level Insert, Update, and Delete Rule
A database must support high-level insertion, updation, and deletion. This must not be
limited to a single row, that is, it must also support union, intersection and minus
operations to yield sets of data records.
 Rule 8: Physical Data Independence
The data stored in a database must be independent of the applications that access the
database. Any change in the physical structure of a database must not have any
impact on how the data is being accessed by external applications.
 Rule 9: Logical Data Independence
The logical data in a database must be independent of its user’s view (application). Any
change in logical data must not affect the applications using it. For example, if two
tables are merged or one is split into two different tables, there should be no impact
or change on the user application. This is one of the most difficult rule to apply.
Codd's 12 Rules
 Rule 10: Integrity Independence
A database must be independent of the application that uses it. All its integrity constraints
can be independently modified without the need of any change in the application. This rule
makes a database independent of the front-end application and its interface.
 Rule 11: Distribution Independence
The end-user must not be able to see that the data is distributed over various locations.
Users should always get the impression that the data is located at one site only. This rule
has been regarded as the foundation of distributed database systems.
 Rule 12: Non-Subversion Rule
If a system has an interface that provides access to low-level records, then the interface
must not be able to subvert the system and bypass security and integrity constraints.
DATABASE SECURITY
 Database Security contains policies and mechanisms to protect the data and ensure that it is not
accessed,altered or deleted without proper authorization.Database security methods focus on
preventing unauthorized users from accessing the database because DBMS features that make
the database easy to access and manipulate ,also open doors to intruders,most DBMS’s include
security features that allow only authorized persons or programs to access data and then restrict
the types of processing that can be accomplished once access is made.
 IMPORTANCE OF DATA
 Bank/Demat Accounts
 Credit card,
 Salary,
 Income tax data
 University Admissions, marks/grades.
 Land records,
 Licenses
 Medical Records
CIA
 Confidentiality: Information should not be disclosed to unauthorized users.
 Integrity: Only authorized users should be allowed to modify data.
 Availability: Authorized users should not be denied access.
NEED FOR DATABASE SECURITY
 It protects data from unauthorized users from altering and deleting data.
 It protects data from hacking by implementing Security mechanisms.
 It allows users to access only that data what is required by enabling necessary
access permissions.
 It implements encryption, decryption, firewalls, antivirus software , database
backups, physical and logical security on the database.
PROBLEMS IN DATABASE SECURITY
 People
 Natural disasters
 Malicious code
 Technological Disaster
PROBLEMS IN DATABASE SECURITY
 1.People: People intentionally or unintentionally inflict damage, violation ,or destruction to
all or violation ,or destruction to all or any of the database environment components (people,
applications, networks, operating systems, database management systems, data files or data)
Example:Employees,Contractors,Consultants,Visitors,Hackers,Terrorists
 2.Malicious Code: Software code that in most cases is intentionally written to damage or
violate one or more of the database environment components . Example: Viruses, Boot
Sector viruses, Worms, Trojan horses, Bugs.
 3.Natural disaster: Calamities caused by nature, which can destroy any or all of the database
environment components. Example: Hurricanes, Tornados, Earthquakes, Flood, Fire
 Technological disasters: Often caused by some sort of malfunction in equipment or
hardware, technological disasters can inflict damage to networks, operating systems,
database management systems, datafiles or data.
Example:Power failure,Media failure,Hardware failure,Network failure
DATABASE PROTECTION REQUIREMENTS:
 Protection from unauthorized access.
 Protection from Inference.
 Integrity of database.
 User Authentication.
 Management and Protection of Sensitive data.
DATABASE PROTECTION REQUIREMENTS:
 1. Protection from unauthorized access: It protects the data from being accessed by
the unauthorized users. The requirement which has been sent by user or applications to
access database or files should be verified by database management system. It should
check whether the user is authorized or not. However, the access control for database is
quite difficult than to control the files, since the control in database is to be applied to
each and every attribute and value of the database.
 2. Protection from Inference. Inference refers to the protection of data from a type of
threat where in an unauthorized user tries to extract or retrieve the confidential
information from non-confidential data. Here, the hacker usually targets the statistical
databases and hence precautions should be taken to protect each entity right from
statistical aggregated information in order to prevent the statical database from such
threats.
DATABASE PROTECTION REQUIREMENTS:
 3.Integrity of Database: It refers to the protection of database from unauthorized
access. The threats can be either in the form of errors, virus, failures in the system
or modification of contents present in data. However, protection for database is
provided by database management system, backup and recovery procedures and
adhoc security procedures. Backup and recovery procedures preserve the
consistency of data using atomicity .That is, the modifications performed on data
are made permanent after the termination of transaction, thus preserving its
consistency. Whereas, the adhoc security procedure protects the data from
unauthorized modifications, insertions and deletions.
DATABASE PROTECTION REQUIREMENTS:
 4.User Authentication: It refers to the identification of the database users. This
requirement is used to enable on the authorized users to access the data.
 5.Management and protection of Sensitive data: It protects the sensitive data
from being accessed by unauthorized users. Database consists of the type of data
which can either be sensitive, public or both. Thus, this requirement protects the
contents of all types of data from hackers.
Security Levels
 Physical: The sites containing the computer systems must be secured against
armed or surreptitious entry by intruders.
 Human: Users must be authorized carefully to reduce the chance of any such user
giving access to an intruder in exchange for a bribe or other favors .
 Operating System: No matter how secure the database system is, weakness
in operating system security may serve as a means of unauthorized access to the
database.
 Network: Since almost all database systems allow remote access through terminals
or networks, software-level security within the network software is as important as
physical security, both on the Internet and in networks private to an enterprise.
 Database System: Some database-system users may be authorized to access only
a limited portion of the database. Other users may be allowed to issue queries, but
may be forbidden to modify the data. It is responsibility of the database system to
ensure that these authorization restrictions are not violated.
Introduction to RDBMS
 RDBMS stands for Relational Database Management System. RDBMS data is
structured in database tables, fields and records.
 Each RDBMS table consists of database table rows. Each database table row
consists of one or more database table fields.
 RDBMS store the data into collection of tables, which might be related by common
fields (database table columns).
 RDBMS also provide relational operators to manipulate the data stored into the
database tables.
 Most RDBMS use SQL as database query language. The most popular RDBMS are
MS SQL Server, DB2, Oracle and MySQL
Introduction to RDBMS
 The goal of a relational database design is to generate a set of relation schema that
allows us to store information without unnecessary redundancy and also to retrieve
information easily.
 A database system is an integrated collection of related files, along with details of
interpretation of the data contained therein. DBMS is a s/w system that allows
access to data contained in a database.
Introduction to RDBMS
Fill in the blanks
 1) A relation in a relational database is based on a relational schema, which consists
of number of ………………… .
 2) …………………is a Relational Data Base Management System.
 3) Rows of the relation are referred to as ………………… of the relation
 4) The relational model was designed by the IBM research scientist and
mathematician, Dr. ………………….
 5) The ………………… is the only data structure used in the relational data model to
represent both entities and relationships between them
State true or false
 1) The normal forms never removes anomalies.
 2) Each attribute of the column are drawn from the set of values known as domain.
 3) The first database systems were based on either network or hierarchical models .
 4) Most RDBMS use SQL as database query language.
 5) Relational database design makes data retrieval difficult.

Unit iii dbms

  • 1.
    UNIT III: RelationalDatabase Management System Relational Data Base Management System: Concept of RDBMS, Its Characteristics And Advantages, Codd’s 12 Rules, Database Security, Introduction To RDBMS.
  • 2.
    Concept of RDBMS Characteristics of Relational Database Model  1. Each relation in a database must have a distinct or unique name which would separate it from the other relations in a database  2. A relation must not have two attributes with the same name. Each attribute must have a distinct name.  3. Duplicate tuples must not be present in a relation.
  • 3.
    Concept of RDBMS Characteristics of Relational Database Model  4. Each tuple must have exactly one data value for an attribute.  5. Tuples in a relation do not have to follow a significant order as the relation is not order-sensitive.  6. Similarly, the attributes of a relation also do not have to follow certain ordering, it’s up to the developer to decide the ordering of attributes.
  • 4.
  • 5.
    Advantages of RDBMS 1.Simple Model A Relational Database system is the most simple model, as it does not require any complex structuring or querying processes. It doesn’t involve tedious architectural processes like hierarchical database structuring or definition. As the structure is simple, it is sufficient to be handled with simple SQL queries and does not require complex queries to be designed. 2. Data Accuracy In the relational database system, there can be multiple tables related to one another with the use of a primary key and foreign key concepts. This makes the data to be non-repetitive. There is no chance for duplication of data. Hence the accuracy of data in the relational database is more than any other database system.
  • 6.
    Advantages of RDBMS 3.Easy Access to Data In the Relational Database System, there is no pattern or pathway for accessing the data, as to another type of databases can be accessed only by navigating through a tree or a hierarchical model. Anyone who accesses the data can query any table in the relational database. 4. Data Integrity Data integrity is a crucial characteristic of the Relational Database system. Sturdy Data entries and legitimacy validations ensure that all the Data in the database confines within suitable arrangements and the data necessary for creating the relationships are present. This relational reliability amongst the tables in the database helps in avoiding the records from being imperfect, isolated or unrelated.
  • 7.
    Advantages of RDBMS 5.Flexibility A Relational Database system by itself possesses qualities for leveling up, expanding for bigger lengths, as it is endowed with a bendable structure to accommodate the constantly shifting requirements. This facilitates the increasing incoming amount of data, as well as the update and deletes wherever required. 6. Normalization The methodical style is maintained for making sure of a relational database structure is liberated of any variances that can make a difference in the integrity and accuracy of the tables in the database. A normalization process provides a set of regulations, characteristics, and purposes for the database structure and evaluation of a relational database model.
  • 8.
    Advantages of RDBMS 7. High Security: As the data is divided amongst the tables of the relational database system, it is possible to make a few tables to be tagged as confidential and others not. This segregation is easily implemented with a relational database management system, unlike other databases.  8. Feasible for Future Modifications: As the relational database system holds records in separate tables based on their categories, it is straightforward to insert, delete or update records that are subjected to the latest requirements. This feature of the relational database model tolerates the newest requirements that are presented by the business
  • 9.
    Codd's 12 Rules Dr Edgar F. Codd, after his extensive research on the Relational Model of database systems, came up with twelve rules of his own, which according to him, a database must obey in order to be regarded as a true relational database.  These rules can be applied on any database system that manages stored data using only its relational capabilities. This is a foundation rule, which acts as a base for all the other rules.
  • 10.
    Codd's 12 Rules Rule 1: Information Rule The data stored in a database, may it be user data or metadata, must be a value of some table cell. Everything in a database must be stored in a table format.  Rule 2: Guaranteed Access Rule Every single data element (value) is guaranteed to be accessible logically with a combination of table-name, primary-key (row value), and attribute-name (column value). No other means, such as pointers, can be used to access data.  Rule 3: Systematic Treatment of NULL Values The NULL values in a database must be given a systematic and uniform treatment. This is a very important rule because a NULL can be interpreted as one the following − data is missing, data is not known, or data is not applicable.
  • 11.
    Codd's 12 Rules Rule 4: Active Online Catalog The structure description of the entire database must be stored in an online catalog, known as data dictionary, which can be accessed by authorized users. Users can use the same query language to access the catalog which they use to access the database itself.  Rule 5: Comprehensive Data Sub-Language Rule A database can only be accessed using a language having linear syntax that supports data definition, data manipulation, and transaction management operations. This language can be used directly or by means of some application. If the database allows access to data without any help of this language, then it is considered as a violation.  Rule 6: View Updating Rule All the views of a database, which can theoretically be updated, must also be updatable by the system.
  • 12.
    Codd's 12 Rules Rule 7: High-Level Insert, Update, and Delete Rule A database must support high-level insertion, updation, and deletion. This must not be limited to a single row, that is, it must also support union, intersection and minus operations to yield sets of data records.  Rule 8: Physical Data Independence The data stored in a database must be independent of the applications that access the database. Any change in the physical structure of a database must not have any impact on how the data is being accessed by external applications.  Rule 9: Logical Data Independence The logical data in a database must be independent of its user’s view (application). Any change in logical data must not affect the applications using it. For example, if two tables are merged or one is split into two different tables, there should be no impact or change on the user application. This is one of the most difficult rule to apply.
  • 13.
    Codd's 12 Rules Rule 10: Integrity Independence A database must be independent of the application that uses it. All its integrity constraints can be independently modified without the need of any change in the application. This rule makes a database independent of the front-end application and its interface.  Rule 11: Distribution Independence The end-user must not be able to see that the data is distributed over various locations. Users should always get the impression that the data is located at one site only. This rule has been regarded as the foundation of distributed database systems.  Rule 12: Non-Subversion Rule If a system has an interface that provides access to low-level records, then the interface must not be able to subvert the system and bypass security and integrity constraints.
  • 14.
    DATABASE SECURITY  DatabaseSecurity contains policies and mechanisms to protect the data and ensure that it is not accessed,altered or deleted without proper authorization.Database security methods focus on preventing unauthorized users from accessing the database because DBMS features that make the database easy to access and manipulate ,also open doors to intruders,most DBMS’s include security features that allow only authorized persons or programs to access data and then restrict the types of processing that can be accomplished once access is made.  IMPORTANCE OF DATA  Bank/Demat Accounts  Credit card,  Salary,  Income tax data  University Admissions, marks/grades.  Land records,  Licenses  Medical Records
  • 15.
    CIA  Confidentiality: Informationshould not be disclosed to unauthorized users.  Integrity: Only authorized users should be allowed to modify data.  Availability: Authorized users should not be denied access.
  • 16.
    NEED FOR DATABASESECURITY  It protects data from unauthorized users from altering and deleting data.  It protects data from hacking by implementing Security mechanisms.  It allows users to access only that data what is required by enabling necessary access permissions.  It implements encryption, decryption, firewalls, antivirus software , database backups, physical and logical security on the database.
  • 17.
    PROBLEMS IN DATABASESECURITY  People  Natural disasters  Malicious code  Technological Disaster
  • 18.
    PROBLEMS IN DATABASESECURITY  1.People: People intentionally or unintentionally inflict damage, violation ,or destruction to all or violation ,or destruction to all or any of the database environment components (people, applications, networks, operating systems, database management systems, data files or data) Example:Employees,Contractors,Consultants,Visitors,Hackers,Terrorists  2.Malicious Code: Software code that in most cases is intentionally written to damage or violate one or more of the database environment components . Example: Viruses, Boot Sector viruses, Worms, Trojan horses, Bugs.  3.Natural disaster: Calamities caused by nature, which can destroy any or all of the database environment components. Example: Hurricanes, Tornados, Earthquakes, Flood, Fire  Technological disasters: Often caused by some sort of malfunction in equipment or hardware, technological disasters can inflict damage to networks, operating systems, database management systems, datafiles or data. Example:Power failure,Media failure,Hardware failure,Network failure
  • 19.
    DATABASE PROTECTION REQUIREMENTS: Protection from unauthorized access.  Protection from Inference.  Integrity of database.  User Authentication.  Management and Protection of Sensitive data.
  • 20.
    DATABASE PROTECTION REQUIREMENTS: 1. Protection from unauthorized access: It protects the data from being accessed by the unauthorized users. The requirement which has been sent by user or applications to access database or files should be verified by database management system. It should check whether the user is authorized or not. However, the access control for database is quite difficult than to control the files, since the control in database is to be applied to each and every attribute and value of the database.  2. Protection from Inference. Inference refers to the protection of data from a type of threat where in an unauthorized user tries to extract or retrieve the confidential information from non-confidential data. Here, the hacker usually targets the statistical databases and hence precautions should be taken to protect each entity right from statistical aggregated information in order to prevent the statical database from such threats.
  • 21.
    DATABASE PROTECTION REQUIREMENTS: 3.Integrity of Database: It refers to the protection of database from unauthorized access. The threats can be either in the form of errors, virus, failures in the system or modification of contents present in data. However, protection for database is provided by database management system, backup and recovery procedures and adhoc security procedures. Backup and recovery procedures preserve the consistency of data using atomicity .That is, the modifications performed on data are made permanent after the termination of transaction, thus preserving its consistency. Whereas, the adhoc security procedure protects the data from unauthorized modifications, insertions and deletions.
  • 22.
    DATABASE PROTECTION REQUIREMENTS: 4.User Authentication: It refers to the identification of the database users. This requirement is used to enable on the authorized users to access the data.  5.Management and protection of Sensitive data: It protects the sensitive data from being accessed by unauthorized users. Database consists of the type of data which can either be sensitive, public or both. Thus, this requirement protects the contents of all types of data from hackers.
  • 23.
    Security Levels  Physical:The sites containing the computer systems must be secured against armed or surreptitious entry by intruders.  Human: Users must be authorized carefully to reduce the chance of any such user giving access to an intruder in exchange for a bribe or other favors .  Operating System: No matter how secure the database system is, weakness in operating system security may serve as a means of unauthorized access to the database.  Network: Since almost all database systems allow remote access through terminals or networks, software-level security within the network software is as important as physical security, both on the Internet and in networks private to an enterprise.  Database System: Some database-system users may be authorized to access only a limited portion of the database. Other users may be allowed to issue queries, but may be forbidden to modify the data. It is responsibility of the database system to ensure that these authorization restrictions are not violated.
  • 24.
    Introduction to RDBMS RDBMS stands for Relational Database Management System. RDBMS data is structured in database tables, fields and records.  Each RDBMS table consists of database table rows. Each database table row consists of one or more database table fields.  RDBMS store the data into collection of tables, which might be related by common fields (database table columns).  RDBMS also provide relational operators to manipulate the data stored into the database tables.  Most RDBMS use SQL as database query language. The most popular RDBMS are MS SQL Server, DB2, Oracle and MySQL
  • 25.
    Introduction to RDBMS The goal of a relational database design is to generate a set of relation schema that allows us to store information without unnecessary redundancy and also to retrieve information easily.  A database system is an integrated collection of related files, along with details of interpretation of the data contained therein. DBMS is a s/w system that allows access to data contained in a database.
  • 26.
  • 27.
    Fill in theblanks  1) A relation in a relational database is based on a relational schema, which consists of number of ………………… .  2) …………………is a Relational Data Base Management System.  3) Rows of the relation are referred to as ………………… of the relation  4) The relational model was designed by the IBM research scientist and mathematician, Dr. ………………….  5) The ………………… is the only data structure used in the relational data model to represent both entities and relationships between them
  • 28.
    State true orfalse  1) The normal forms never removes anomalies.  2) Each attribute of the column are drawn from the set of values known as domain.  3) The first database systems were based on either network or hierarchical models .  4) Most RDBMS use SQL as database query language.  5) Relational database design makes data retrieval difficult.