SlideShare a Scribd company logo
Database Management Systems
OBJECTIVES:
• To study the physical and logical database designs, database
modeling, relational, hierarchical, and network models
• To understand and use data manipulation language to query,
update, and manage a database
• To develop an understanding of essential DBMS concepts
such as: database security, integrity, concurrency,
distributed database, and intelligent database, Client/Server
(Database Server), Data Warehousing.
• To design and build a simple database system and
demonstrate competence with the fundamental tasks
involved with modeling, designing, and implementing a
DBMS.
Database Management Systems
Outcomes:
• Demonstrate the basic elements of a relational
database management system
• Ability to identify the data models for relevant
problems
• Ability to design entity relationship and convert
entity relationship diagrams into RDBMS and
formulate SQL queries on the respective data
• Apply normalization for the development of
application software.
TEXT BOOKS:
• 1. Database System Concepts, Silberschatz,
Korth, McGraw hill, Sixth Edition.(All UNITS
except III th)
• 2. Database Management Systems, Raghu
Ramakrishnan, Johannes Gehrke, TATA
McGrawHill 3rd Edition.
Unit – 1
Introduction to Database Management
Systems
Data :- Data is (or collection of) facts or statistics
or reports.
Database :- Collection of interrelated data which
describes or represents real world entity(object).
Database Management Systems :- It is a
collection of interrelated data and a set of
programs to access and manipulate those data.
Database System Applications
• Banking
• Airlines
• Universities
• Credit card transactions
• Telecommunications
• Finance
• Sales
• Online retailers
• Manufacturing
• Human resources
Purpose of DBMS
• Database systems arose in response to early methods
of computerized management of commercial data.
• One way to keep the information on a computer is to
store it in operating system files. To allow users to
manipulate the information, the system has a number
of application programs that manipulate the files.
• File-processing system is supported by a conventional
operating system. The system stores permanent
records in various files, and it needs different
application programs to extract records from, and add
records to, the appropriate files.
Problems with File Processing Systems
• Data redundancy and inconsistency
• Difficulty in accessing data
• Data isolation
• Integrity problems
• Atomicity problems
• Concurrent-access anomalies
• Security problems
Advantages of DBMS
1. Redundancy can be reduced
2. Inconsistency can be avoided
3. Data can be shared
4. Standards can be enforced
5. Security restrictions can be applied
6. Integrity can be maintained
7. Data gathering can be possible
8. Requirements can be balanced
9. Reduced Application Development and
Maintenance Time
Disadvantages of DBMS
• It is bit complex. Since it supports multiple functionality to
give the user the best, the underlying software has become
complex. The designers and developers should have
thorough knowledge about the software to get the most out
of it.
• Because of its complexity and functionality, it uses large
amount of memory. It also needs large memory to run
efficiently.
• DBMS system works on the centralized system, i.e.; all the
users from all over the world access this database. Hence any
failure of the DBMS, will impact all the users.
• DBMS is generalized software, i.e.; it is written work on the
entire systems rather specific one. Hence some of the
application will run slow.
View of Data
A major purpose of a database system is to
provide users with an abstract view of the data.
That is, the system hides certain details of how
the data are stored and maintained.
• Data Abstraction
Data Abstraction
• Physical level (or Internal View / Schema): The lowest level
of abstraction describes how the data are actually stored.
The physical level describes complex low-level data
structures in detail.
• Logical level (or Conceptual View / Schema): The next-
higher level of abstraction describes what data are stored in
the database, and what relationships exist among those
data.
• View level (or External View / Schema): The highest level of
abstraction describes only part of the entire database. Even
though the logical level uses simpler structures, complexity
remains because of the variety of information stored in a
large database.
Unit-1 DBMS24.pptxruzruxtidtixift8ffticiycyoc
For example, we may describe a record as follows:
type instructor = record
ID : char (5);
name : char (20);
dept name : char (20);
salary : numeric (8,2);
end;
This code defines a new record type called instructor with four fields. Each field has a
name and a type associated with it. A university organization may have several such
record types, including
• department, with fields dept_name, building, and budget
• course, with fields course_id, title, dept_name, and credits
At the physical level, an instructor, department, or student record can be described as a
block of consecutive storage locations.
At the logical level, each such record is described by a type definition, as in the previous
code segment, and the interrelationship of these record types is defined as well.
Finally, at the view level, computer users see a set of application programs that hide
details of the data types. At the view level, several views of the database are
defined, and a database user sees some or all of these views.
Instances and Schemas
• Databases change over time as information is
inserted and
deleted. information
stored in
The collection
of the
database at
a
particular moment is called an instance of the
database.
• The overall design of the database is called the
database schema.
Relation
A database relation simply refers to an
individual table in a relational
database.
Unit-1 DBMS24.pptxruzruxtidtixift8ffticiycyoc
Database Languages
• A database system provides a data-definition
language to specify the database schema and
a data-manipulation language to express
database queries and updates.
• These are not two separate languages but
combine as one single database language such
as SQL (Structured Query Language).
Query
A query is a statement requesting an operation
or action to be performed by the database.
Data-Manipulation Language
A data-manipulation language (DML) is a language
that enables users to access or manipulate data.
The types of access are:
• Retrieval of information stored in the database
• Insertion of new information into the database
• Deletion of information from the database
• Modification of information stored in
the database
Data-Manipulation Language
There are basically two types:
• Procedural DMLs require a user to specify
what data are needed and how to get those
data.
• Declarative DMLs (also referred to as
nonprocedural DMLs) require a user to specify
what data are needed without specifying how
to get those data.
Data-Definition Language (DDL)
• Database schema is specified by a set of
definitions expressed by a special language
called a data- definition language (DDL).
• The DDL is also used to specify additional
properties of the data.
• Domain Constraints: A domain of possible
values must be associated with every attribute
(for example, integer types, character types,
date/time types).
• Referential Integrity: There are cases where
we wish to ensure that a value that appears in
one relation for a given set of attributes also
appears in a certain set of attributes in
another relation (referential integrity).
• Assertions: An assertion is any condition that
the
database
constraints
must always satisfy.
Domain and
referential-integrity
constraints are special forms of assertions.
However, there are many constraints that we
cannot express by using only these special
forms. For example, “Every department must
have at least five courses offered every
semester” must be expressed as an assertion.
• Authorization: We may want to differentiate among
the users as far as the type of access they are
permitted on various data values in the database.
These differentiations are expressed in terms of
authorization, the most common being: read
authorization, which allows reading, but not
modification, of data; insert authorization, which
allows insertion of new data, but not modification of
existing data; update authorization, which allows
modification, but not deletion, of data; and delete
authorization, which allows deletion of data. We may
assign the user all, none, or a combination of these
types of authorization.
• The DDL, just like any other programming
language, gets as input some instructions
(statements) and generates some output. The
output of the DDL is placed in the data
dictionary,which contains metadata—that is,
data about data.
Data dictionary typically stores descriptions of:
• Data elements that are define in all tables of all databases.
• Tables define in all databases.
• Indexes define for each database tables.
• Define databases: who created each database, the date of
creation where the database is located, who the DBA is and so
on.
• End users and The Administrators of the data base.
• Programs that access the database including screen formats,
report formats, application formats, SQL queries and so on.
• Access authorization for all users of all databases.
• Relationships among data elements, which elements are
involved: whether the relationship are mandatory or optional,
the connectivity and cardinality and so on.
Database Administrators and
Database Users
• Database Users and User Interfaces
• There are four different types of database-
system users, differentiated by the way they
expect to interact with the system.
1. Naive users
2. Application programmers
3. Sophisticated users - Online analytical
processing (OLAP) tools simplify analysts’ tasks
by letting them view summaries of data in
different ways.
Database Architecture
• The architecture of a database system is greatly
influenced by the underlying computer system on
which the database system runs.
• Database systems can be centralized, or client-
server, where one server machine executes work
on behalf of multiple client machines.
• Database systems can also be designed to exploit
parallel computer architectures. Distributed
databases which span multiple geographically
separated machines.
Unit-1 DBMS24.pptxruzruxtidtixift8ffticiycyoc
• A database system is partitioned into modules that
deal with each of the responsibilities of the overall
system.
• The functional components of a database system can
be broadly divided into the storage manager and the
query processor components.
• The storage manager is important because databases
typically require a large amount of storage space.
• The query processor is important because it helps
the database system simplify and facilitate access to
data.
Database Architecture
Database Architecture
Query Processor:
The query processor components include
• DDL interpreter, which interprets DDL statements and
records the definitions in the data dictionary.
• DML compiler, which translates DML statements in a query
language into an evaluation plan consisting of low-level
instructions that the query evaluation engine understands.
• A query can usually be translated into any of a number of
alternative evaluation plans that all give the same result.
The DML compiler also performs query optimization, that
is, it picks the lowest cost evaluation plan from among the
alternatives.
• Query evaluation engine executes low-level instructions
generated by the DML compiler.
Storage Manager:
• A storage manager is a program module that provides the
interface between the low level data stored in the database
and the application programs and queries submitted to the
system.
• The storage manager is responsible for the interaction with
the file manager.
• The storage manager components include:
• Authorization and integrity manager, which tests for the
satisfaction of integrity constraints and checks the authority
of users to access data.
• Transaction manager, which ensures that the database
remains in a consistent (correct) state despite system failures,
and that concurrent transaction executions proceed without
conflicting.
• File manager, which manages the allocation of space on disk
storage and the data structures used to represent information
stored on disk.
• Buffer manager, which is responsible for fetching data from
disk storage into main memory, and deciding what data to
cache in main memory.
• The buffer manager is a critical part of the database system,
since it enables the database to handle data sizes that are
much larger than the size of main memory.
Database Architecture
• The architecture of a database system is greatly
influenced by the underlying computer system on
which the database system runs.
• Database systems can be centralized, or client-
server, where one server machine executes work
on behalf of multiple client machines.
• Database systems can also be designed to exploit
parallel computer architectures. Distributed
databases which span multiple geographically
separated machines.
1-Tier architecture :
 DBMS can be seen as either single
tier or multi tier.
 An n tier architecture divides the
whole system into related but
independent n modules.
1-Tier:
•It is a user interface
•It is a presentation service
•Application programmer
For Example:
 To learn SQL we set up an SQL server and the database on the local system.
 This enables us to directly interact with the relational database and execute
operations.
 The industry won’t use this architecture they logically go for 2-tier and 3-tier
Architecture.
2-tier Architecture
•It is a client –server architecture
•Direct communication client and DB server
•Run faster than previous tier.
Advantages of 2-Tier Architecture
1. Easy to Access: 2-Tier Architecture makes easy access to the
database, which makes fast retrieval.
2. Scalable: We can scale the database easily, by adding clients or
upgrading hardware.
3. Low Cost: 2-Tier Architecture is cheaper than 3-Tier
Architecture and Multi-Tier Architecture.
4. Easy Deployment: 2-Tier Architecture is easier to deploy than
3-Tier Architecture.
5. Simple: 2-Tier Architecture is easily understandable as well as
simple because of only two components.
Unit-1 DBMS24.pptxruzruxtidtixift8ffticiycyoc
3-tier Architecture
 It separates tiers from each other based
on complexity of the users and how they
use the data present DB.
 It is web based application.
Advantages of 3-Tier Architecture
 Enhanced scalability
 Data Integrity
 Data Integrity
Data Models
• Data models define how the logical structure of a
database is designed. 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.
• Data Model is a logical structure of Database. It
describes the design of database to reflect entities,
attributes, relationship among data, constrains etc.
Data Models
Types of Data Models
• Hierarchical Model
• Network Database Model
• Entity Relationship Model
• Relational Model
• Object Model
Hierarchical Model
• In hierarchical model, data is organized into a tree like
structure with each record is having one parent record and
many children.
• The main drawback of this model is that, it can have only one
to many relationships between nodes.
Unit-1 DBMS24.pptxruzruxtidtixift8ffticiycyoc
Network Database Model
• Network Database Model is same like Hierarchical
Model, but the only difference is that it allows a
record to have more than one parent.
• In this model, there is no need of parent to child
association like the hierarchical model.
• It replaces the hierarchical tree with a graph.
• It represents the data as record types and one-to-
many relationship.
• This model is easy to design and understand.
Unit-1 DBMS24.pptxruzruxtidtixift8ffticiycyoc
Object Model
• Object model stores the data in the form of objects,
classes and inheritance.
• This model handles more complex applications, such
as Geographic Information System (GIS), scientific
experiments, engineering design and manufacturing.
• It is used in File Management System.
• It represents real world objects, attributes
and behaviors.
• It provides a clear modular structure.
• It is easy to maintain and modify the existing code.
Unit-1 DBMS24.pptxruzruxtidtixift8ffticiycyoc
Entity Relationship Model
• In this database model, relationships are created by
dividing object of interest into entity and its
characteristics into attributes.
• Different entities are related using relationships.
• E-R Models are defined to represent the
relationships into pictorial form to make it easier
for different stakeholders to understand.
• This model is good to design a database, which can
then be turned into tables in relational model
Unit-1 DBMS24.pptxruzruxtidtixift8ffticiycyoc
Unit-1 DBMS24.pptxruzruxtidtixift8ffticiycyoc
• ER Model is best used for the conceptual design of a database.
ER Model is based on: −
• Entities and their attributes.
• Relationships among entities.
Modeling
• A database can be modeled as:
– a collection of entities,
– relationship among entities.
• An entity is an object that exists and is
distinguishable from other objects.
Example: specific person, company, event,
plant
• Entities have attributes
Example: people have names and addresses
• An entity set is a set of entities of the same type that
share the same properties.
– Example: set of all persons, companies, trees, holidays
Slide No:L2-
3
Entity Sets customer and loan
customer_id customer_ customer_
customer_
loan_ amount
name street city number
Attributes
• An entity is represented by a set of attributes, that is
descriptive properties possessed by all members of an
entity set.
• Domain – the set of permitted values for each
attribute
• Attribute types:
– Simple and composite attributes.
– Single-valued and multi-valued attributes
• Example: multivalued attribute:
phone_numbers
– Derived attributes
• Can be computed from other attributes
• Example: age, given
date_of_birth
Example:
customer = (customer_id, customer_name,
customer_street, customer_city )
loan = (loan_number, amount )
Composite Attributes
Unit-1 DBMS24.pptxruzruxtidtixift8ffticiycyoc
Unit-1 DBMS24.pptxruzruxtidtixift8ffticiycyoc
Relational Model
• The relational model is today the primary data model for
commercial data processing applications.
• It attained its primary position because of its simplicity, which
eases the job of the programmer, compared to earlier data
models such as the network model or the hierarchical model.
• Relational model is based on first-order predicate logic.
• This model was first proposed by E. F. Codd.
• It represents data as relations or tables.
• Relational database simplifies the database structure by
making use of tables and columns.
Structure of Relational Databases
• A relational database consists of a collection of tables, each
of which is assigned a unique name.
• For example, consider the instructor table, which stores
information about instructors.
• The table has four column headers: ID, name, dept name, and
salary. Each row of this table records information about an
instructor, consisting of the instructor’s ID, name, dept name,
and salary.
 Keys are one of the basic requirements of a relational database model.
 It is widely used to identify the tuples(rows) uniquely in the table.
 We also use keys to set up relations amongst various columns and
tables of a relational database.
 Each tuple in a relation must be unique.
Keys
Different Types of Database Keys:
1. Candidate Key
2. Primary Key
3. Super Key
4. Foreign Key
5. Composite Key
Table STUDENT:
STUD_NO SNAME ADDRESS PHONE
1 Shyam Delhi 123456789
2 Rakesh Kolkata 223365796
3 Suraj Delhi 175468965
Candidate Key:
 The minimal set of attributes that can uniquely
identify a tuple is known as a candidate key.
 For Example, STUD_NO in STUDENT relation.
 The minimal set of attributes that can uniquely
identify a record.
 It must contain unique values.
 It can contain NULL values.
 Every table must have at least a single candidate
key.
 A table can have multiple candidate keys but
only one primary key.
 The value of the Candidate Key is unique and
may be null for a tuple.
 There can be more than one candidate key in a
relationship.
The candidate key can be simple (having only one
attribute) or composite as well.
Example:
{STUD_NO, COURSE_NO} is a composite
candidate key for relation STUDENT_COURSE.
Table STUDENT_COURSE
STUD_NO
TEACHER_N
O
COURSE_NO
1 001 C001
2 056 C005
Primary Key
• There can be more than one candidate key in relation out of which one
can be chosen as the primary key.
• For Example, STUD_NO, as well as STUD_PHONE, are candidate keys for
relation STUDENT but STUD_NO can be chosen as the primary key (only
one out of many candidate keys).
 It is a unique key.
 It can identify only one tuple (a record) at a time.
 It has no duplicate values, it has unique values.
 It cannot be NULL.
 Primary keys are not necessarily to be a single column; more than one
column can also be a primary key for a table.
Example:
STUDENT table -> Student(STUD_NO, SNAME, ADDRESS, PHONE) , STUD_NO is
a primary key
STUD_NO SNAME ADDRESS PHONE
1 Shyam Delhi 123456789
2 Rakesh Kolkata 223365796
3 Suraj Delhi 175468965
Table STUDENT
Super Key
 The set of attributes that can uniquely identify a tuple is
known as Super Key.
 For Example, STUD_NO, (STUD_NO, STUD_NAME), etc.
 A super key is a group of single or multiple keys that
identifies rows in a table.
 It supports NULL values.
 Adding zero or more attributes to the candidate key generates
the super key.
 A candidate key is a super key but vice versa is not true.
 Super Key values may also be NULL.
Example:
Consider the table shown above.
STUD_NO+PHONE is a super key.
Relation between Primary Key, Candidate Key, and Super Key
Foreign Key:
 It is a key it acts as a primary key in one table and it acts as
secondary key in another table.
 It combines two or more relations (tables) at a time.
 They act as a cross-reference between the tables.
 For example, DNO is a primary key in the DEPT table and a
non-key in EMP
Example:
Refer Table STUDENT shown above.
STUD_NO in STUDENT_COURSE is a
foreign key to STUD_NO in STUDENT relation.
Table STUDENT_COURSE
STUD_NO TEACHER_NO COURSE_NO
1 005 C001
2 056 C005
Relation between Primary Key and Foreign Key
Composite Key:
 To uniquely identify rows of a table, a combination of two or
more columns/attributes can be used.
 It still can give duplicate values in rare cases.
 So, we need to find the optimal set of attributes that can
uniquely identify rows in a table.
 It acts as a primary key if there is no primary key in a table
 Two or more attributes are used together to make a
composite key.
 Different combinations of attributes may give different accuracy
in terms of identifying the rows uniquely.
Example:
FULLNAME + DOB can be combined
together to access the details of a student.
Different Types of Keys
Keys
• We use the term primary key to denote a candidate
key that is chosen by the database designer as the
principle means of identifying tuples within a relation.
• It is customary to list the primary key attributes of a
relation schema before the other attributes; for
example, the dept name attribute of department is
listed first, since it is the primary key.
• Primary key attributes are also underlined. A relation,
say r1, may include among its attributes the primary
key of another relation, say r2. This attribute is called a
foreign key from r1, referencing r2.
• r1 is called referencing relation and r2 is called
referrenced relation.
Schema Diagrams
• A database schema, along with primary key and
foreign key dependencies, can be depicted by
schema diagrams.
Details of a Customer
Schema of Customer
Unit-1 DBMS24.pptxruzruxtidtixift8ffticiycyoc
Database Design
 Database Design can be defined as a set of procedures or
collection of tasks involving various steps taken to implement a
database.
 Following are some critical points to keep in mind to achieve a
good database design:
i. Data consistency and integrity must be maintained.
ii. Low Redundancy
iii. Faster searching through indices
iv. Security measures should be taken by enforcing various
integrity constraints.
v. Data should be stored in fragmented bits of information
Database Design
The database design lifecycle :
1. Requirement Analysis: the requirements of our application imply
appropriate integrity constraints to maintain the data integrity &
consistency.
2. Logical & Physical Design: the actual design phase that involves various
steps that are to be taken while designing a database.
Logical Data Model Design:
 with a high-level design of our database based on initially gathered requirements to structure
& organize our data accordingly.
 this phase proceeds by identifying the kind of data to be stored and what relationship will
exist among those data.
Physical Design of Data Model:
 The implementation of the logical design made in the previous stage. All the relationships
among data and integrity constraints are implemented to maintain consistency & generate
the actual database.
3. Data Insertion and testing for various integrity Constraints
 This phase involves testing our database for its integrity to see if something got left out or,
if anything new to add & then integrating it with the desired application.
Entity Relationship(ER) Modeling
Database Design Techniques
• ER Modeling (Top down Approach)
• Normalization (Bottom Up approach)
An Entity–relationship model (ER model) describes the
structure of a database with the help of a diagram, which
is known as Entity Relationship Diagram (ER Diagram).
An ER model is a design or blueprint of a database that
can later be implemented as a database. The main
components of E-R model are: entity set and relationship
set.
Entity Relationship(ER) Modeling
The ER or (Entity Relational Model) is a high-level
conceptual data model diagram. Entity-Relation model
is based on the notion of real-world entities and the
relationship between them.
What is ER Modeling?
A graphical technique for Understanding and organizing the data
Independent of the actual Database implementation.
Entity
• An entity is a “thing’’ or “object” in the real
world that is disguisable from all objects.
•An entity set is a set of entities of same type.
•In ER modeling, notation for entity is given below.
• An entity is represented by a set of attributes.
• Each entity has a value of each of its attributes.
• Weak Entity:
An entity that cannot be uniquely identified by its own
attributes and relies on the relationship with other
entity is called weak entity. The weak entity is
represented by a double rectangle.
Weak Entity
Attribute
s
• An attribute describes the property of an
entity. An attribute is represented as Oval in
an ER diagram. There are four types of
attributes:
• 1. Key attribute
2. Composite attribute
3. Multivalued attribute
4. Derived attribute
Unit-1 DBMS24.pptxruzruxtidtixift8ffticiycyoc
Relationships
• A relationship is represented by diamond shape in
ER diagram, it shows the relationship among
entities. There are four types of relationships:
1. One to One
2. One to Many
3. Many to One
4. Many to Many
Unit-1 DBMS24.pptxruzruxtidtixift8ffticiycyoc
Relationship Participation
1. Total participation
 In total participation, every entity instance will be
connected through the relationship to another instance of
the other participating entity types.
2. Partial participation
 Consider the relationship - Employee is head of the
department.
 Here all employees will not be the head of the department. Only one
employee will be the head of the department.
 In other words, only few instances of employee entity participate in the
above relationship. So employee entity's participation is partial in the said
relationship.
Unit-1 DBMS24.pptxruzruxtidtixift8ffticiycyoc
Advantages
• ER Modeling is simple and easily understandable. It is represented in business
users language and it can be understood by non-technical specialist.
• Intuitive and helps in Physical Database creation.
• Can be generalized and specialized based on needs.
• Can help in database design.
• Gives a higher level description of the system.
Disadvantages
• Physical design derived from E-R Model may
have some amount of ambiguities or
inconsistency.
• Sometime diagrams may lead to
misinterpretations.
Design Issues of Entity-Relationship
1. Use of Entity sets versus Attributes.
2. Use of Entity sets versus Relationship sets.
3. Binary versus n-ary Relationship sets.
4. Placement of Relationship Attributes.
Use of entity set vs attributes
Use of Entity Sets vs Relationship Sets
Binary versus nary Relationship Sets
Binary versus nary Relationship Sets
Placement of Relationship Attributes
Relational Algebra
 Relational Algebra is a procedural query language.
 Relational algebra mainly provides a theoretical foundation for relational
databases and SQL.
 The main purpose of using Relational Algebra is to define operators that
transform one or more input relations into an output relation.
 it is pure mathematics, there is no use of English Keywords in Relational Algebra
and operators are represented using symbols.
Fundamental Operators:
These are the basic/fundamental operators used in Relational Algebra.
1. Selection(σ)
2. Projection(π)
3. Union(U)
4. Set Difference(-)
5. Set Intersection(∩)
6. Rename(ρ)
7. Cartesian Product(X)

More Related Content

PPTX
DATABASE MANAGEMENT SYSTEMS PPT .pptx
PPTX
Utsav Mahendra : Introduction to Database and managemnet
PPTX
1st Unit Rdjjkkijhghhjjiikjhttttyybms.pptx
PPTX
Unit 2 DATABASE ESSENTIALS.pptx
PPTX
Unit 1.pptx
PPTX
DatabaseManagementSystem.pptx
PPTX
CHAPTER 1 Database system architecture.pptx
PPTX
Presentation on Database management system
DATABASE MANAGEMENT SYSTEMS PPT .pptx
Utsav Mahendra : Introduction to Database and managemnet
1st Unit Rdjjkkijhghhjjiikjhttttyybms.pptx
Unit 2 DATABASE ESSENTIALS.pptx
Unit 1.pptx
DatabaseManagementSystem.pptx
CHAPTER 1 Database system architecture.pptx
Presentation on Database management system

Similar to Unit-1 DBMS24.pptxruzruxtidtixift8ffticiycyoc (20)

PPT
9a797dbms chapter1 b.sc2
PPT
8028.ppt
PDF
01-Database Administration and Management.pdf
PPT
Database management system lecture notes
PPT
Ch1_Intro-95(1).ppt
PPTX
Arinda oktaviana 11353204810 vii lokal g
PPTX
DATABASE MANAGEMENT SYSTEMS_module1.pptx
PDF
RDBMS UNIT-1.pdf PPT covered all basic cocepts of RDBMS and schema and compon...
PPTX
01-database-management.pptx
PPTX
Complete first chapter rdbm 17332
PPTX
Components of Database Management Systems
PDF
DBMS 1.pdf from computer application for business
PPT
INTRODUCTION TO DATABASE
PDF
PPTX
Database Systems Lec 1.pptx
PPTX
Unit 1 dbms
PPTX
LEARNING OBJECTIVES education relational.pptx
PPTX
Module 1 - Chapter 2.pptx
PPTX
database management system anna universityUnit1.pptx
9a797dbms chapter1 b.sc2
8028.ppt
01-Database Administration and Management.pdf
Database management system lecture notes
Ch1_Intro-95(1).ppt
Arinda oktaviana 11353204810 vii lokal g
DATABASE MANAGEMENT SYSTEMS_module1.pptx
RDBMS UNIT-1.pdf PPT covered all basic cocepts of RDBMS and schema and compon...
01-database-management.pptx
Complete first chapter rdbm 17332
Components of Database Management Systems
DBMS 1.pdf from computer application for business
INTRODUCTION TO DATABASE
Database Systems Lec 1.pptx
Unit 1 dbms
LEARNING OBJECTIVES education relational.pptx
Module 1 - Chapter 2.pptx
database management system anna universityUnit1.pptx
Ad

Recently uploaded (20)

PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PPTX
AgentX UiPath Community Webinar series - Delhi
PDF
LEAP-1B presedntation xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPTX
TE-AI-Unit VI notes using planning model
PDF
B.Tech (Electrical Engineering ) 2024 syllabus.pdf
PPTX
Ship’s Structural Components.pptx 7.7 Mb
PDF
BRKDCN-2613.pdf Cisco AI DC NVIDIA presentation
PPTX
Fluid Mechanics, Module 3: Basics of Fluid Mechanics
PDF
July 2025: Top 10 Read Articles Advanced Information Technology
PDF
flutter Launcher Icons, Splash Screens & Fonts
PPTX
metal cuttingmechancial metalcutting.pptx
PPTX
Lesson 3_Tessellation.pptx finite Mathematics
PDF
Introduction to Data Science: data science process
PDF
MCAD-Guidelines. Modernization of command Area Development, Guideines
PDF
dse_final_merit_2025_26 gtgfffffcjjjuuyy
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PPTX
Simulation of electric circuit laws using tinkercad.pptx
PDF
algorithms-16-00088-v2hghjjnjnhhhnnjhj.pdf
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
AgentX UiPath Community Webinar series - Delhi
LEAP-1B presedntation xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
TE-AI-Unit VI notes using planning model
B.Tech (Electrical Engineering ) 2024 syllabus.pdf
Ship’s Structural Components.pptx 7.7 Mb
BRKDCN-2613.pdf Cisco AI DC NVIDIA presentation
Fluid Mechanics, Module 3: Basics of Fluid Mechanics
July 2025: Top 10 Read Articles Advanced Information Technology
flutter Launcher Icons, Splash Screens & Fonts
metal cuttingmechancial metalcutting.pptx
Lesson 3_Tessellation.pptx finite Mathematics
Introduction to Data Science: data science process
MCAD-Guidelines. Modernization of command Area Development, Guideines
dse_final_merit_2025_26 gtgfffffcjjjuuyy
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
Simulation of electric circuit laws using tinkercad.pptx
algorithms-16-00088-v2hghjjnjnhhhnnjhj.pdf
Ad

Unit-1 DBMS24.pptxruzruxtidtixift8ffticiycyoc

  • 1. Database Management Systems OBJECTIVES: • To study the physical and logical database designs, database modeling, relational, hierarchical, and network models • To understand and use data manipulation language to query, update, and manage a database • To develop an understanding of essential DBMS concepts such as: database security, integrity, concurrency, distributed database, and intelligent database, Client/Server (Database Server), Data Warehousing. • To design and build a simple database system and demonstrate competence with the fundamental tasks involved with modeling, designing, and implementing a DBMS.
  • 2. Database Management Systems Outcomes: • Demonstrate the basic elements of a relational database management system • Ability to identify the data models for relevant problems • Ability to design entity relationship and convert entity relationship diagrams into RDBMS and formulate SQL queries on the respective data • Apply normalization for the development of application software.
  • 3. TEXT BOOKS: • 1. Database System Concepts, Silberschatz, Korth, McGraw hill, Sixth Edition.(All UNITS except III th) • 2. Database Management Systems, Raghu Ramakrishnan, Johannes Gehrke, TATA McGrawHill 3rd Edition.
  • 4. Unit – 1 Introduction to Database Management Systems Data :- Data is (or collection of) facts or statistics or reports. Database :- Collection of interrelated data which describes or represents real world entity(object). Database Management Systems :- It is a collection of interrelated data and a set of programs to access and manipulate those data.
  • 5. Database System Applications • Banking • Airlines • Universities • Credit card transactions • Telecommunications • Finance • Sales • Online retailers • Manufacturing • Human resources
  • 6. Purpose of DBMS • Database systems arose in response to early methods of computerized management of commercial data. • One way to keep the information on a computer is to store it in operating system files. To allow users to manipulate the information, the system has a number of application programs that manipulate the files. • File-processing system is supported by a conventional operating system. The system stores permanent records in various files, and it needs different application programs to extract records from, and add records to, the appropriate files.
  • 7. Problems with File Processing Systems • Data redundancy and inconsistency • Difficulty in accessing data • Data isolation • Integrity problems • Atomicity problems • Concurrent-access anomalies • Security problems
  • 8. Advantages of DBMS 1. Redundancy can be reduced 2. Inconsistency can be avoided 3. Data can be shared 4. Standards can be enforced 5. Security restrictions can be applied 6. Integrity can be maintained 7. Data gathering can be possible 8. Requirements can be balanced 9. Reduced Application Development and Maintenance Time
  • 9. Disadvantages of DBMS • It is bit complex. Since it supports multiple functionality to give the user the best, the underlying software has become complex. The designers and developers should have thorough knowledge about the software to get the most out of it. • Because of its complexity and functionality, it uses large amount of memory. It also needs large memory to run efficiently. • DBMS system works on the centralized system, i.e.; all the users from all over the world access this database. Hence any failure of the DBMS, will impact all the users. • DBMS is generalized software, i.e.; it is written work on the entire systems rather specific one. Hence some of the application will run slow.
  • 10. View of Data A major purpose of a database system is to provide users with an abstract view of the data. That is, the system hides certain details of how the data are stored and maintained. • Data Abstraction
  • 11. Data Abstraction • Physical level (or Internal View / Schema): The lowest level of abstraction describes how the data are actually stored. The physical level describes complex low-level data structures in detail. • Logical level (or Conceptual View / Schema): The next- higher level of abstraction describes what data are stored in the database, and what relationships exist among those data. • View level (or External View / Schema): The highest level of abstraction describes only part of the entire database. Even though the logical level uses simpler structures, complexity remains because of the variety of information stored in a large database.
  • 13. For example, we may describe a record as follows: type instructor = record ID : char (5); name : char (20); dept name : char (20); salary : numeric (8,2); end; This code defines a new record type called instructor with four fields. Each field has a name and a type associated with it. A university organization may have several such record types, including • department, with fields dept_name, building, and budget • course, with fields course_id, title, dept_name, and credits At the physical level, an instructor, department, or student record can be described as a block of consecutive storage locations. At the logical level, each such record is described by a type definition, as in the previous code segment, and the interrelationship of these record types is defined as well. Finally, at the view level, computer users see a set of application programs that hide details of the data types. At the view level, several views of the database are defined, and a database user sees some or all of these views.
  • 14. Instances and Schemas • Databases change over time as information is inserted and deleted. information stored in The collection of the database at a particular moment is called an instance of the database. • The overall design of the database is called the database schema.
  • 15. Relation A database relation simply refers to an individual table in a relational database.
  • 17. Database Languages • A database system provides a data-definition language to specify the database schema and a data-manipulation language to express database queries and updates. • These are not two separate languages but combine as one single database language such as SQL (Structured Query Language).
  • 18. Query A query is a statement requesting an operation or action to be performed by the database.
  • 19. Data-Manipulation Language A data-manipulation language (DML) is a language that enables users to access or manipulate data. The types of access are: • Retrieval of information stored in the database • Insertion of new information into the database • Deletion of information from the database • Modification of information stored in the database
  • 20. Data-Manipulation Language There are basically two types: • Procedural DMLs require a user to specify what data are needed and how to get those data. • Declarative DMLs (also referred to as nonprocedural DMLs) require a user to specify what data are needed without specifying how to get those data.
  • 21. Data-Definition Language (DDL) • Database schema is specified by a set of definitions expressed by a special language called a data- definition language (DDL). • The DDL is also used to specify additional properties of the data.
  • 22. • Domain Constraints: A domain of possible values must be associated with every attribute (for example, integer types, character types, date/time types). • Referential Integrity: There are cases where we wish to ensure that a value that appears in one relation for a given set of attributes also appears in a certain set of attributes in another relation (referential integrity).
  • 23. • Assertions: An assertion is any condition that the database constraints must always satisfy. Domain and referential-integrity constraints are special forms of assertions. However, there are many constraints that we cannot express by using only these special forms. For example, “Every department must have at least five courses offered every semester” must be expressed as an assertion.
  • 24. • Authorization: We may want to differentiate among the users as far as the type of access they are permitted on various data values in the database. These differentiations are expressed in terms of authorization, the most common being: read authorization, which allows reading, but not modification, of data; insert authorization, which allows insertion of new data, but not modification of existing data; update authorization, which allows modification, but not deletion, of data; and delete authorization, which allows deletion of data. We may assign the user all, none, or a combination of these types of authorization.
  • 25. • The DDL, just like any other programming language, gets as input some instructions (statements) and generates some output. The output of the DDL is placed in the data dictionary,which contains metadata—that is, data about data.
  • 26. Data dictionary typically stores descriptions of: • Data elements that are define in all tables of all databases. • Tables define in all databases. • Indexes define for each database tables. • Define databases: who created each database, the date of creation where the database is located, who the DBA is and so on. • End users and The Administrators of the data base. • Programs that access the database including screen formats, report formats, application formats, SQL queries and so on. • Access authorization for all users of all databases. • Relationships among data elements, which elements are involved: whether the relationship are mandatory or optional, the connectivity and cardinality and so on.
  • 27. Database Administrators and Database Users • Database Users and User Interfaces • There are four different types of database- system users, differentiated by the way they expect to interact with the system. 1. Naive users 2. Application programmers 3. Sophisticated users - Online analytical processing (OLAP) tools simplify analysts’ tasks by letting them view summaries of data in different ways.
  • 28. Database Architecture • The architecture of a database system is greatly influenced by the underlying computer system on which the database system runs. • Database systems can be centralized, or client- server, where one server machine executes work on behalf of multiple client machines. • Database systems can also be designed to exploit parallel computer architectures. Distributed databases which span multiple geographically separated machines.
  • 30. • A database system is partitioned into modules that deal with each of the responsibilities of the overall system. • The functional components of a database system can be broadly divided into the storage manager and the query processor components. • The storage manager is important because databases typically require a large amount of storage space. • The query processor is important because it helps the database system simplify and facilitate access to data. Database Architecture
  • 32. Query Processor: The query processor components include • DDL interpreter, which interprets DDL statements and records the definitions in the data dictionary. • DML compiler, which translates DML statements in a query language into an evaluation plan consisting of low-level instructions that the query evaluation engine understands. • A query can usually be translated into any of a number of alternative evaluation plans that all give the same result. The DML compiler also performs query optimization, that is, it picks the lowest cost evaluation plan from among the alternatives. • Query evaluation engine executes low-level instructions generated by the DML compiler.
  • 33. Storage Manager: • A storage manager is a program module that provides the interface between the low level data stored in the database and the application programs and queries submitted to the system. • The storage manager is responsible for the interaction with the file manager. • The storage manager components include: • Authorization and integrity manager, which tests for the satisfaction of integrity constraints and checks the authority of users to access data.
  • 34. • Transaction manager, which ensures that the database remains in a consistent (correct) state despite system failures, and that concurrent transaction executions proceed without conflicting. • File manager, which manages the allocation of space on disk storage and the data structures used to represent information stored on disk. • Buffer manager, which is responsible for fetching data from disk storage into main memory, and deciding what data to cache in main memory. • The buffer manager is a critical part of the database system, since it enables the database to handle data sizes that are much larger than the size of main memory.
  • 35. Database Architecture • The architecture of a database system is greatly influenced by the underlying computer system on which the database system runs. • Database systems can be centralized, or client- server, where one server machine executes work on behalf of multiple client machines. • Database systems can also be designed to exploit parallel computer architectures. Distributed databases which span multiple geographically separated machines.
  • 36. 1-Tier architecture :  DBMS can be seen as either single tier or multi tier.  An n tier architecture divides the whole system into related but independent n modules. 1-Tier: •It is a user interface •It is a presentation service •Application programmer For Example:  To learn SQL we set up an SQL server and the database on the local system.  This enables us to directly interact with the relational database and execute operations.  The industry won’t use this architecture they logically go for 2-tier and 3-tier Architecture.
  • 37. 2-tier Architecture •It is a client –server architecture •Direct communication client and DB server •Run faster than previous tier. Advantages of 2-Tier Architecture 1. Easy to Access: 2-Tier Architecture makes easy access to the database, which makes fast retrieval. 2. Scalable: We can scale the database easily, by adding clients or upgrading hardware. 3. Low Cost: 2-Tier Architecture is cheaper than 3-Tier Architecture and Multi-Tier Architecture. 4. Easy Deployment: 2-Tier Architecture is easier to deploy than 3-Tier Architecture. 5. Simple: 2-Tier Architecture is easily understandable as well as simple because of only two components.
  • 39. 3-tier Architecture  It separates tiers from each other based on complexity of the users and how they use the data present DB.  It is web based application. Advantages of 3-Tier Architecture  Enhanced scalability  Data Integrity  Data Integrity
  • 40. Data Models • Data models define how the logical structure of a database is designed. 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. • Data Model is a logical structure of Database. It describes the design of database to reflect entities, attributes, relationship among data, constrains etc.
  • 41. Data Models Types of Data Models • Hierarchical Model • Network Database Model • Entity Relationship Model • Relational Model • Object Model
  • 42. Hierarchical Model • In hierarchical model, data is organized into a tree like structure with each record is having one parent record and many children. • The main drawback of this model is that, it can have only one to many relationships between nodes.
  • 44. Network Database Model • Network Database Model is same like Hierarchical Model, but the only difference is that it allows a record to have more than one parent. • In this model, there is no need of parent to child association like the hierarchical model. • It replaces the hierarchical tree with a graph. • It represents the data as record types and one-to- many relationship. • This model is easy to design and understand.
  • 46. Object Model • Object model stores the data in the form of objects, classes and inheritance. • This model handles more complex applications, such as Geographic Information System (GIS), scientific experiments, engineering design and manufacturing. • It is used in File Management System. • It represents real world objects, attributes and behaviors. • It provides a clear modular structure. • It is easy to maintain and modify the existing code.
  • 48. Entity Relationship Model • In this database model, relationships are created by dividing object of interest into entity and its characteristics into attributes. • Different entities are related using relationships. • E-R Models are defined to represent the relationships into pictorial form to make it easier for different stakeholders to understand. • This model is good to design a database, which can then be turned into tables in relational model
  • 51. • ER Model is best used for the conceptual design of a database. ER Model is based on: − • Entities and their attributes. • Relationships among entities.
  • 52. Modeling • A database can be modeled as: – a collection of entities, – relationship among entities. • An entity is an object that exists and is distinguishable from other objects. Example: specific person, company, event, plant • Entities have attributes Example: people have names and addresses • An entity set is a set of entities of the same type that share the same properties. – Example: set of all persons, companies, trees, holidays
  • 53. Slide No:L2- 3 Entity Sets customer and loan customer_id customer_ customer_ customer_ loan_ amount name street city number
  • 54. Attributes • An entity is represented by a set of attributes, that is descriptive properties possessed by all members of an entity set. • Domain – the set of permitted values for each attribute • Attribute types: – Simple and composite attributes. – Single-valued and multi-valued attributes • Example: multivalued attribute: phone_numbers – Derived attributes • Can be computed from other attributes • Example: age, given date_of_birth Example: customer = (customer_id, customer_name, customer_street, customer_city ) loan = (loan_number, amount )
  • 58. Relational Model • The relational model is today the primary data model for commercial data processing applications. • It attained its primary position because of its simplicity, which eases the job of the programmer, compared to earlier data models such as the network model or the hierarchical model. • Relational model is based on first-order predicate logic. • This model was first proposed by E. F. Codd. • It represents data as relations or tables. • Relational database simplifies the database structure by making use of tables and columns.
  • 59. Structure of Relational Databases • A relational database consists of a collection of tables, each of which is assigned a unique name. • For example, consider the instructor table, which stores information about instructors. • The table has four column headers: ID, name, dept name, and salary. Each row of this table records information about an instructor, consisting of the instructor’s ID, name, dept name, and salary.
  • 60.  Keys are one of the basic requirements of a relational database model.  It is widely used to identify the tuples(rows) uniquely in the table.  We also use keys to set up relations amongst various columns and tables of a relational database.  Each tuple in a relation must be unique. Keys
  • 61. Different Types of Database Keys: 1. Candidate Key 2. Primary Key 3. Super Key 4. Foreign Key 5. Composite Key Table STUDENT: STUD_NO SNAME ADDRESS PHONE 1 Shyam Delhi 123456789 2 Rakesh Kolkata 223365796 3 Suraj Delhi 175468965
  • 62. Candidate Key:  The minimal set of attributes that can uniquely identify a tuple is known as a candidate key.  For Example, STUD_NO in STUDENT relation.  The minimal set of attributes that can uniquely identify a record.  It must contain unique values.  It can contain NULL values.  Every table must have at least a single candidate key.  A table can have multiple candidate keys but only one primary key.  The value of the Candidate Key is unique and may be null for a tuple.  There can be more than one candidate key in a relationship. The candidate key can be simple (having only one attribute) or composite as well. Example: {STUD_NO, COURSE_NO} is a composite candidate key for relation STUDENT_COURSE. Table STUDENT_COURSE STUD_NO TEACHER_N O COURSE_NO 1 001 C001 2 056 C005
  • 63. Primary Key • There can be more than one candidate key in relation out of which one can be chosen as the primary key. • For Example, STUD_NO, as well as STUD_PHONE, are candidate keys for relation STUDENT but STUD_NO can be chosen as the primary key (only one out of many candidate keys).  It is a unique key.  It can identify only one tuple (a record) at a time.  It has no duplicate values, it has unique values.  It cannot be NULL.  Primary keys are not necessarily to be a single column; more than one column can also be a primary key for a table.
  • 64. Example: STUDENT table -> Student(STUD_NO, SNAME, ADDRESS, PHONE) , STUD_NO is a primary key STUD_NO SNAME ADDRESS PHONE 1 Shyam Delhi 123456789 2 Rakesh Kolkata 223365796 3 Suraj Delhi 175468965 Table STUDENT
  • 65. Super Key  The set of attributes that can uniquely identify a tuple is known as Super Key.  For Example, STUD_NO, (STUD_NO, STUD_NAME), etc.  A super key is a group of single or multiple keys that identifies rows in a table.  It supports NULL values.  Adding zero or more attributes to the candidate key generates the super key.  A candidate key is a super key but vice versa is not true.  Super Key values may also be NULL. Example: Consider the table shown above. STUD_NO+PHONE is a super key.
  • 66. Relation between Primary Key, Candidate Key, and Super Key
  • 67. Foreign Key:  It is a key it acts as a primary key in one table and it acts as secondary key in another table.  It combines two or more relations (tables) at a time.  They act as a cross-reference between the tables.  For example, DNO is a primary key in the DEPT table and a non-key in EMP Example: Refer Table STUDENT shown above. STUD_NO in STUDENT_COURSE is a foreign key to STUD_NO in STUDENT relation. Table STUDENT_COURSE STUD_NO TEACHER_NO COURSE_NO 1 005 C001 2 056 C005
  • 68. Relation between Primary Key and Foreign Key
  • 69. Composite Key:  To uniquely identify rows of a table, a combination of two or more columns/attributes can be used.  It still can give duplicate values in rare cases.  So, we need to find the optimal set of attributes that can uniquely identify rows in a table.  It acts as a primary key if there is no primary key in a table  Two or more attributes are used together to make a composite key.  Different combinations of attributes may give different accuracy in terms of identifying the rows uniquely. Example: FULLNAME + DOB can be combined together to access the details of a student.
  • 71. Keys • We use the term primary key to denote a candidate key that is chosen by the database designer as the principle means of identifying tuples within a relation. • It is customary to list the primary key attributes of a relation schema before the other attributes; for example, the dept name attribute of department is listed first, since it is the primary key. • Primary key attributes are also underlined. A relation, say r1, may include among its attributes the primary key of another relation, say r2. This attribute is called a foreign key from r1, referencing r2. • r1 is called referencing relation and r2 is called referrenced relation.
  • 72. Schema Diagrams • A database schema, along with primary key and foreign key dependencies, can be depicted by schema diagrams. Details of a Customer Schema of Customer
  • 74. Database Design  Database Design can be defined as a set of procedures or collection of tasks involving various steps taken to implement a database.  Following are some critical points to keep in mind to achieve a good database design: i. Data consistency and integrity must be maintained. ii. Low Redundancy iii. Faster searching through indices iv. Security measures should be taken by enforcing various integrity constraints. v. Data should be stored in fragmented bits of information
  • 75. Database Design The database design lifecycle :
  • 76. 1. Requirement Analysis: the requirements of our application imply appropriate integrity constraints to maintain the data integrity & consistency. 2. Logical & Physical Design: the actual design phase that involves various steps that are to be taken while designing a database. Logical Data Model Design:  with a high-level design of our database based on initially gathered requirements to structure & organize our data accordingly.  this phase proceeds by identifying the kind of data to be stored and what relationship will exist among those data. Physical Design of Data Model:  The implementation of the logical design made in the previous stage. All the relationships among data and integrity constraints are implemented to maintain consistency & generate the actual database. 3. Data Insertion and testing for various integrity Constraints  This phase involves testing our database for its integrity to see if something got left out or, if anything new to add & then integrating it with the desired application.
  • 77. Entity Relationship(ER) Modeling Database Design Techniques • ER Modeling (Top down Approach) • Normalization (Bottom Up approach) An Entity–relationship model (ER model) describes the structure of a database with the help of a diagram, which is known as Entity Relationship Diagram (ER Diagram). An ER model is a design or blueprint of a database that can later be implemented as a database. The main components of E-R model are: entity set and relationship set.
  • 78. Entity Relationship(ER) Modeling The ER or (Entity Relational Model) is a high-level conceptual data model diagram. Entity-Relation model is based on the notion of real-world entities and the relationship between them.
  • 79. What is ER Modeling? A graphical technique for Understanding and organizing the data Independent of the actual Database implementation.
  • 80. Entity • An entity is a “thing’’ or “object” in the real world that is disguisable from all objects. •An entity set is a set of entities of same type. •In ER modeling, notation for entity is given below. • An entity is represented by a set of attributes. • Each entity has a value of each of its attributes.
  • 81. • Weak Entity: An entity that cannot be uniquely identified by its own attributes and relies on the relationship with other entity is called weak entity. The weak entity is represented by a double rectangle. Weak Entity
  • 82. Attribute s • An attribute describes the property of an entity. An attribute is represented as Oval in an ER diagram. There are four types of attributes: • 1. Key attribute 2. Composite attribute 3. Multivalued attribute 4. Derived attribute
  • 84. Relationships • A relationship is represented by diamond shape in ER diagram, it shows the relationship among entities. There are four types of relationships: 1. One to One 2. One to Many 3. Many to One 4. Many to Many
  • 86. Relationship Participation 1. Total participation  In total participation, every entity instance will be connected through the relationship to another instance of the other participating entity types. 2. Partial participation  Consider the relationship - Employee is head of the department.  Here all employees will not be the head of the department. Only one employee will be the head of the department.  In other words, only few instances of employee entity participate in the above relationship. So employee entity's participation is partial in the said relationship.
  • 88. Advantages • ER Modeling is simple and easily understandable. It is represented in business users language and it can be understood by non-technical specialist. • Intuitive and helps in Physical Database creation. • Can be generalized and specialized based on needs. • Can help in database design. • Gives a higher level description of the system.
  • 89. Disadvantages • Physical design derived from E-R Model may have some amount of ambiguities or inconsistency. • Sometime diagrams may lead to misinterpretations.
  • 90. Design Issues of Entity-Relationship 1. Use of Entity sets versus Attributes. 2. Use of Entity sets versus Relationship sets. 3. Binary versus n-ary Relationship sets. 4. Placement of Relationship Attributes.
  • 91. Use of entity set vs attributes
  • 92. Use of Entity Sets vs Relationship Sets
  • 93. Binary versus nary Relationship Sets
  • 94. Binary versus nary Relationship Sets
  • 96. Relational Algebra  Relational Algebra is a procedural query language.  Relational algebra mainly provides a theoretical foundation for relational databases and SQL.  The main purpose of using Relational Algebra is to define operators that transform one or more input relations into an output relation.  it is pure mathematics, there is no use of English Keywords in Relational Algebra and operators are represented using symbols. Fundamental Operators: These are the basic/fundamental operators used in Relational Algebra. 1. Selection(σ) 2. Projection(π) 3. Union(U) 4. Set Difference(-) 5. Set Intersection(∩) 6. Rename(ρ) 7. Cartesian Product(X)