0% found this document useful (0 votes)
40 views

Unit-1 DBMS Notes

Uploaded by

Roshan Choudhary
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views

Unit-1 DBMS Notes

Uploaded by

Roshan Choudhary
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 85

Department of Computer

Science & Engineering


DATABASE MANAGEMENT SYSTEM (DBMS)

Ms. Mandakini Ingle


Assistant Professor
CSE

UNIT–I
Introduction: Concept & Overview of DBMS, Purpose of DBMS, Architecture of
DBMS, Data Models and its Types, Schema and Instances, Data Independence,
DBA,Functions of DBA .

Entity-Relationship Model: Basic concepts,Entity,Attribute and its types,Mapping


cardinalities, Keys, Entity-Relationship Diagram, Weak Entity Sets ,Strong Entity
Sets and Extended E-R features[Generalization,Specialization and Aggrigation] , ER
Diagram o Relational Table conversion.
Basics of DBMS
• Data : Known facts/raw material that can be recorded and have
an implicit meaning. Form numbers, text, audio, video, pictures,
images etc.
• Example: flipkart,OLA

• Database : A collection of related data that represents some real


world entities or objects. Database Should be used to solve our
problems.
• Age=25,car price =60000, software name=TCS,IBM
• Example:University website, hospital data,enterprise
data,Government organization etc.
Basics of DBMS..........
• Information: Meaningful/Processed data. We can extract
information from meaningful data. It is a useful thing.
Information is depends on a particular requirement of that
person.
• Example: YouTube, Railway IRCTC
DBMS [Database Management System ]
• A database management system (DBMS) is a software package
designed to create, manipulate, retrieve and manage data in a
database.
• A DBMS generally manipulates the data itself, the data format,
field names, record structure, and file structure. It provides users
and programmers with a systematic way to create, retrieve,
update and manage data.
• DataBase Management USER

Systems (DBMS) • Hide

• Redundancy • DATABASE

Inconsistency DATABASE

USER
DBMS

What is a Database?
• A set of information stored in a computer in a
specific manner”

• “It is a collection of data arranged for ease and


speed of search and retrieval”

• Database System : The DBMS software together with the


data itself. Sometimes, the applications are also included.
Database System
A database system = combination of a database, a DBMS,
and application programs

Because of the advantages offered by a DBMS, businesses


and organizations prefer the database approach to the file
based approach
The Database System
Limitations of file-based approach tell us that:
• Parameters defining data should be separately stored •
There should be a way to control and manipulate data in
isolation of the application program

A database management system (DBMS) is a piece of software


that allows a user to define, create, and manage access to a
database
Decouples application programs from data
The database stores all its data in one location, thereby limiting
data duplication
Evolution of Database System
❖ Two approaches to convert data to
information: – File-based
▪ Developed in 1980’s

▪ Stores, manipulates, retrieves data from large flat files

– Database (relational systems)


▪ Developed by E. F. Codd of IBM in the early

1980's ▪ Widely used today


History of DBMS
• 1960 – First DBMS designed by Charles Bachman at GE.
Integrated Data source(IBS).
• 1970 – Codd introduced IMS. IBMs Information Management
System (IMS)

• 1980 – Relational model became popular and accepted as the


main database paradigm. SQL, ANSI SQL, etc.

• 1980 to 1990 – New data models, powerful query languages,


etc. Popular vendors are Oracle, SQL Server, IBMs DB2,
Informix, etc
File-Based Approach
•A file is a collection of related
information
• A system of files and
collection of application
programs manipulating them
is a file-based system

A File-Based System

Limitations of File-Based
Approach Efforts for query answering:
• What is the average grade for BE students?
• List
the activities for all students enrolled in 2019.
• Which personnel are students as well as staff?

Other limitations:
• Data redundancy:Duplication of data
• Data Isolation:Data dependency
• Data inconsistency:No data updation at all places •
Data Security:
• Slow development, high maintenance and fixed queries
Purpose of Database Systems
In the early days, database applications were built
directly on top of file systems, which leads to:
• Data redundancy and inconsistency: data is stored in multiple file
formats resulting induplication of information in different files •
Difficulty in accessing data
– Need to write a new program to carry out each new task
• Data isolation
– Multiple files and formats
• Integrity problems
– Integrity constraints (e.g., account balance > 0) become
“buried” in program code rather than being stated explicitly –
Hard to add new constraints or change existing ones
Purpose of Database Systems (Cont.)

• Atomicity of updates
– Failures may leave database in an inconsistent state with partial updates
carried out
– Example: Transfer of funds from one account to another should either
complete or not happen at all
• Concurrent access by multiple users
– Concurrent access needed for performance
– Uncontrolled concurrent accesses can lead to inconsistencies • Ex:
Two people reading a balance (say 100) and updating it by
withdrawing money (say 50 each) at the same time
• Security problems
– Hard to provide user access to some, but not all, data
Database systems offer solutions to all the
above problems
Advantage of DBMS over file system

• No redundant data
• Data Consistency and Integrity
• Data Security
• Privacy
• Easy access to data
• Easy recovery
• Flexible
Database Applications Examples
• Enterprise Information
– Sales: customers, products, purchases
– Accounting: payments, receipts, assets
– Human Resources: Information about employees, salaries, payroll taxes.
• Banking and finance
– customer information, accounts, loans, and banking transactions.
– Credit card transactions
– Finance: sales and purchases of financial instruments (e.g., stocks and bonds; storing real-time market
data
• Airlines: reservations, schedules
• Telecommunication: records of calls, texts, and data usage, generating monthly bills, maintaining balances
on prepaid calling cards
• Universities: registration, grades, students record

Application of Database.....
Telephone directories
• Train timetables •
Airline bookings •
• Web indexes
Credit card details •
• Library catalogues
Student records •
• Medical records •
Customer histories •
Bank accounts
Stock market prices •
• Stock control
Discussion boards •
• Personnel systems • and so on…
Product catalogues •

Database Management System Functions


• Data Definition: DDL processor and compiler to deal with DDL •
Data Manipulation: DML processor and compiler to deal with DML •
Optimization and execution
• Data Dictionary Management,
• Data Storage Management,
• Data Transformation and Presentation,
• Data Security & Integrity
• Multi-User Access Control,
• Recovery Management and concurrency
DDL and DML in DBMS
DDL:

DDL is Data Definition Language which is used to define data


structures.
For example: create table, alter table are instructions in
SQL. DML:

DML is Data Manipulation Language which is used to


manipulate data itself.
For example: insert, update, delete are instructions in SQL.
Data Dictionary

A data dictionary contains metadata i.e data about the database.


It contains information like:

• what is in the database,


• who can access it
• where is the database physically stored etc.

The users of the database normally don't interact with the data
dictionary, it is only handled by the database administrators.
The data dictionary holds information about the following

− •Names of all the database tables and their schemas.

•Details
about all the tables in the database, such as their
owners, their security constraints, when they were created etc.

•Physical information: where tables are stored and how.

•Tableconstraints: primary key attributes, foreign key


information etc.
•Information about the database views that are visible.
Database Systems
• A database system consists of
• Data (the database)
• Hardware
• Software
• Users

• Database systems allow users to


• Store

• Update

• Retrieve
• Organise
• Protect

their data.
Architecture of Database Management System :
•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 divided
into
• The Disk Storage,
• The storage manager,
• The query processor component,
• The Users and its interaction.
Architecture
of Database
Management
System
1. The disk Storage
• The disk storage or physical storage is use for storing the data. In many big
enterprises,the database range in size from hundred of gigabytes to terabytes
of data. The main memory is not so largeer that it holds that much information
and data. so we needed a larger disk storage for the database. • It contains
DATA , Statistical Dta,Data Dictionary and Indices.

The Disk Storage(Cont.)


• The storage manager implements several data structures as part of the
physical system implementation:

– Data files -- store the database itself

– Data dictionary -- stores metadata about the structure of the


database, in particular the schema of the database.

– Indices -- can provide fast access to data items. A database index


provides pointers to those data items that hold a particular value.
2. Storage Manager
• 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 to the following tasks:
– Interaction with the OS file manager
– Efficient storing, retrieving and updating of data
• The storage manager components include:
_Buffer manager
– File manager
– Authorization and integrity manager
– Transaction manager
2. Storage 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.

3. Query Processor
• The query processor components include:
– DDL interpreter -- interprets DDL statements and records the
definitions in the data dictionary.
– DML compiler -- translates DML statements in a query language
into an evaluation plan consisting of low-level instructions that the
query evaluation engine understands.
• The DML compiler performs query optimization; that is, it picks
the lowest cost evaluation plan from among the various
alternatives.
– Query evaluation engine -- executes low-level instructions
generated by the DML compiler.
Query Processing
1. Parsing and translation
2. Optimization
3. Evaluation

Transaction Management
• A transaction is a collection of operations that performs a single logical function in a
database application

• Transaction-management component ensures that the database remains in a


consistent (correct) state despite system failures (e.g., power failures and operating
system crashes) and transaction failures.

• Concurrency-control manager controls the interaction among the concurrent


transactions, to ensure the consistency of the database.

Database Architecture
• Centralized databases
– One to a few cores, shared memory
• Client-server,
– One server machine executes work on behalf of multiple client machines.
• Parallel databases
– Many core shared memory
– Shared disk
– Shared nothing
• Distributed databases
– Geographical distribution
– Schema/data heterogeneity
DBMS Architecture (Centralized/Shared-Memory)
Database Users
Difference between DBMS and Traditional File System •
DBMS is very expensive but, the traditional file system is cheap.
• DBMS is good for the large system but, the traditional file system is good for a small
system having a small number of items.

• DBMS required lots of effort for designing but, the traditional file system is very low
design efforts.

• DBMS is highly secured but, the traditional file system is not secure.

• DBMS is data sharable but, the traditional file system is isolated data sharable. • DBMS is

flexible but, the traditional file system has a lack of flexibility and has many limitations. •

DBMS has no integrity but, the traditional file system has an integrity problem. • DBMS has
a complex backup system but, the traditional file system has a simple backup system. •

DBMS removed data redundancy but, the traditional file system has data redundancy.

Instances and Schemas


• A collection of information stored in the database at a particular moment
is called an instance of database. And the overall design/structure of
database is called the database schema.

• Similar to types and variables in programming languages • Logical


Schema – the overall logical structure of the database – Example: The
database consists of information about a set of customers and accounts
in a bank and the relationship between them
• Analogous to type information of a variable in a program •
Physical schema – the overall physical structure of the database •
Instance – the actual content of the database at a particular point in time
– Analogous to the value of a variable
Three Level Schema Architecture of Database
Three Level Schema Architecture of Database

External/Conceptual
mapping

Conceptual/Internal
mapping

Three Level
Schema
Architecture of Database.....
1. External level:- It is also called view level. The reason this level is called “view” is
because several users can view their desired data from this level which is internally
fetched from database with the help of conceptual and internal level mapping.

The view schema describes the end user interaction with database systems. 2.
Conceptual level:-It is also called logical level. The whole design of the database such as
relationship among data, schema of data etc. are described in this level. Programmers and
database administrators work at this level.

3. Internal level:- This level is also known as physical level. This level describes how the
data is actually stored in the storage devices. This level is also responsible for allocating
space to the data. This is the lowest level of the architecture.

Database Applications
Database applications are usually partitioned into three parts
• One-tier architecture --Sinle layer architecture,in which database
and application resides in single machine/system.use only DBA
while designing a database.

• Two-tier architecture -- the application resides at the client machine,


where it invokes database system functionality at the server
machine.

• Three-tier architecture -- the client machine acts as a front end and


does not contain any direct database calls.
– The client end communicates with an application server, usually
through a forms interface.
– The application server in turn communicates with a database
system to access data.
DBMS architectures
architecture

1-tier
architecture

One-tier
Two-tier architecture Three-tier Architectures
Client Machine Client Machine

USER

Client Application Program


Application
Application Program Layer
USER

Network Network
Data Server
Application

Database Server Server Database


Business Layer
Layer
Server
Server Machine Server Machine

• Data Independence:

• Data independence can be explained using the three-schema


architecture.
• Data independence refers characteristic of being able to modify the
schema at one level of the database system without altering the
schema at the next higher level.
• Data independence helps you to keep data separated from all
programs that make use of it.
• There are two types of data independence:
1. Physical Data Independence
• – the ability to modify the physical/internal schemas without changing the
logical/conceptual schema
– Applications depend on the logical schema
• In general, the interfaces between the various levels and components should be
well defined so that changes in some parts do not seriously influence others. –
Physical data independence can be defined as the capacity to change the
internal schema without having to change the conceptual schema. – If we do
any changes in the storage size of the database system server, then the
Conceptual structure of the database will not be affected.
– Physical data independence is used to separate conceptual levels from the
internal levels.
– Physical data independence occurs at the logical interface level.
2.Logical Data Independence
– the ability to modify the conceptual schema without changing the
external/physical schemas or application programs.
– Applications depend on the logical schema
– In general, the interfaces between the various levels and components should be
well defined so that changes in some parts do not seriously influence others. –
Logical data independence refers characteristic of being able to change the
conceptual schema without having to change the external schema.
– Logical data independence is used to separate the external level from the
conceptual view.
– If we do any changes in the conceptual view of the data, then the user view of the
data would not be affected.
– Logical data independence occurs at the user interface level.
Database Administrator (DBA)
• A Database Administrator (DBA) in Database Management System (DBMS) is an IT
professional who works on creating, maintaining, querying, and tuning the database
of the organization.It is a person in the organization who controls the design and the
use of the database refers as DBA,who has central control over the system .

• Role and Duties of Database Administrator (DBA) :


• Decides hardware
• Database design
• Manages data integrity and security
• Database implementation
• Query processing performance
Database Administrator Functions
Functions of a DBA include:

• Schema definition
• Storage structure and access-method definition
• Schema and physical-organization modification
• Granting of authorization for data access
• Routine maintenance
• Periodically backing up the database
• Ensuring that enough free disk space is available for normal operations, and upgrading disk
space as required
• Monitoring jobs running on the database

Functions of a DBA.............
• 1. Schema Definition:
• The DBA definition the logical Schema of the database.A Schema refers to the
overall logical structure of the database.
• According to this schema, database will be developed to store required data for an
organization.
• 2. Storage Structure and Access Method Definition:
• The DBA decides how the data is to be represented in the stored database.
• 3. Assisting Application Programmers:
• The DBA provides assistance to application programmers to develop application
programs.
• 4. Physical Organization Modification:
• The DBA modifies the physical organization of the database to reflext the changing
needs of the organization or to improve performance.
Functions of a DBA ...
• 5. Approving Data Access:
• The DBA determines which user needs access to which part of the database. •
According to this,various types of authorizations are granted to different users. •
6. Monitoring Performance:
• The DBA monitors performance of the system.The DBA ensures that better
performance is maintained by making changes in physical or logical schema if
required.
• 7. Backup and Recovery:
• Database should not be lost or damaged.
• The DBA ensures this periodically backing up the database on magnetic tapes or
remote servers.
• In case of failure, such as virus attack database is recovered from this backup.
ata oes
A data model is a collection of concepts for describing data,
its relationships, and its constraints
• Provides a clearer and more accurate description and
representation of data
• Standard platform that enables database designers and end
users to communicate
Components of Data Models
1. Structure Part: Consisting of set of rules according to which
databases can be constructed.
2. Manipulative Part: Define the types of operation that are allowed
on the data.

3. Set of Integrity Rules: Which ensures that data is accurate.


Types of Data Models

Come in three varieties:


• Object-based models (conceptual schema)

• Record-based models (external schema) •


Physical data models (internal schema)
1. Object-Based Data Models
Object-based data models use entities, attributes, and relationships to present
information.Describe data at the conceptual and view levels.

An entity is a living or non-living object in the real world


Examples: Person, place, event
An attribute is a property of an entity
Examples: Name, address of a person
A relationship is an association between entities
Example: Register is a relationship between student and courses
Some common types of object-based data models include:
Entity-relationship data model Functional data model Object-oriented data model
1. Object-Based Data Models........
• In this both data and their relationship are organised or contained in a single structure known
as object.
• Object includes information about relationship between the facts within the object,as well as
information about relationship with other objects.
• It is also said to be semantic data model.
• An object is the abstraction of the real world entity and an object represents only one occurrence
of entity.
• Attributes: It describes the property of an object.
• For example:-
• Shape, Circle, Rectangle and Triangle are all objects in this model. Circle has the attributes Center
and Radius.Rectangle has the attributes Length and Breath. Triangle has the attributes Base and
Height . The objects Circle, Rectangle and Triangle inherit from the object Shape.
Types of Object Based Data Models

a) Entity Relationship
b) Object Oriented
c) Semantic
d) Functional
a. Entity-Relationship Data Model

The entity-relationship model has emerged as one of the most


popular and widely used techniques in today's databases
Describes data in the form of an E-R diagram:
• Entitiesare rectangles (“Student” and “Department”)
• Relationships are diamonds (“Belongs to”)

• Attributes are ovals (“SSN”, “Name”)


• Cardinalities
are constraints on relationships (“>” and “|”)
ER DATA 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.
• Let's take an example, If we have to design a School Database,
then Student will be an entity with attributes name, age, address
etc. As Address is generally complex, it can be
another entity with attributes street name, pincode, city etc, and
there will be a relationship between them.
• Relationships can also be of different types.
ER DATA MODEL
Entity
Attribute
ER DATA MODEL...........
Advantages of ER Model
• Simple: Conceptually ER Model is very easy to build. If we know the relationship between the
attributes and the entities we can easily build the ER Diagram for the model.
• Effective Communication Tool: This model is used widely by the database designers for
communicating their ideas.
• Easy Conversion to any Model: This model maps well to the relational model and can be easily
converted relational model by converting the ER model to the table. This model can also be
converted to any other model like network model, hierarchical model etc.

Disadvantages of ER Model
• No industry standard for notation: There is no industry standard for developing an ER model. So one
developer might use notations which are not understood by other developers.
• Hidden information: Some information might be lost or hidden in the ER model. As it is a high level
view so there are chances that some details of information might be hidden.

b. Object-Oriented Data Model


• The real-world problems are more closely represented through the
object-oriented data model. In this model, both the data and
relationship are present in a single structure known as an object.
• We can store audio, video, images, etc in the database which was not
possible in the relational model .

• In this model, two are more objects are connected through links. We
use this link to relate one object to other objects.

Object-Oriented Data Model


Object-Oriented Data Model........

• In the above example, we have two objects Employee and Department.


All the data and relationships of each object are contained as a single
unit. The attributes like Name, Job_title of the employee and the
methods which will be performed by that object are stored as a single
object. The two objects are connected through a common attribute i.e
the Department_id and the communication between these two will be
done with the help of this common id.
2. Record-Based Data Models
• Record-based data models use records to present data.
• A record is a structure that contains a fixed number of fields to hold a piece of
information.
• It is used to specify the overall logical structure of the database and to provide a
higher-level description of the implementation. Structured database in fixed
formats.

There are three main types of record-based data models:


1. Relational data models
2. Network data models
3. Hierarchical data models
a. Relational Data Model
• In this model, data is organised in two-dimensional tables and the relationship

is maintained by storing a common field.

• This model was introduced by E.F Codd in 1970, and since then it has been

the most widely used database model, infact, we can say the only database
model used around the world.

• The basic structure of data in the relational model is tables. All the information

related to a particular type is stored in rows of that table.

• Hence, tables are also known as relations in relational model.


a. Relational Data Models......
Each table consists of a fixed number of named columns
(attributes) and an arbitrary number of unnamed rows (records)
Relational Data Model
Relational Data Model.......
Advnatages of Relational Model
• Simple: This model is more simple as compared to the network and hierarchical model. •
Scalable: This model can be easily scaled as we can add as many rows and columns we want.
• Structural Independence: We can make changes in database structure without changing the way to
access the data. When we can make changes to the database structure without affecting the
capability to DBMS to access the data we can say that structural independence has been achieved.

Disadvantages of Relational Model


• Hardware Overheads: For hiding the complexities and making things easier for the user this model
requires more powerful hardware computers and data storage devices.
• Bad Design: As the relational model is very easy to design and use. So the users don't need to know
how the data is stored in order to access it. This ease of design can lead to the development of a poor
database which would slow down if the database grows.

b. NETWORK DATA MODEL


• This is an extension of the Hierarchical model. In this model data is
organised more like a graph, and are allowed to have more than one parent
node.

• In this database model data is more related as more relationships are


established in this database model. Also, as the data is more related, hence
accessing the data is also easier and fast. This database model was used
to map many-to-many data relationships.

• This was the most widely used database model, before Relational Model
was introduced.
NETWORK DATA MODEL....
NETWORK DATA MODEL
Advantages of Network Model

• The data can be accessed faster as compared to the hierarchical model. This is because
the data is more related in the network model and there can be more than one path to
reach a particular node. So the data can be accessed in many ways.

• As there is a parent-child relationship so data integrity is present. Any change in parent


record is reflected in the child record.

Disadvantages of Network Model

• As more and more relationships need to be handled the system might get complex. So, a
user must be having detailed knowledge of the model to work with the model.

• Any change like updation, deletion, insertion is very complex.

C. Hierarchical Data Model


• This database model organizes data into a tree-like-structure, with a single root,
to which all the other data is linked. The hierarchy starts from the Root data, and
expands like a tree, adding child nodes to the parent nodes.

• In this model, a child node will only have a single parent node.

• This model efficiently describes many real-world relationships like index of a


book, recipes etc.

• In hierarchical model, data is organised into tree-like structure with one one-to
many relationship between two different types of data, for example, one
department can have many courses, many professors and of-course many
students.
Hierarchical Data Model

Hierarchical Data Model


Advantages of Hierarchical Model
• It is very simple and fast to traverse through a tree-like structure. •

Any change in the parent node is automatically reflected in the child


node so, the integrity of data is maintained.

Disadvantages of Hierarchical Model


• Complex relationships are not supported.

• As it does not support more than one parent of the child node so if we

have some complex relationship where a child node needs to have


two parent node then that can't be represented using this model.
• If a parent node is deleted then the child node is automatically

deleted.
3. Physical Data Models
• It describe how data is stored in the computer, representing information
such as record structures, record ordering and access paths.

• It describe the data at lowest level.

• tto describe the behaviour of data at disk level, the way is data and data
relationships are maintained while storing them on the disk.

• Decide the way the DBMS is gi=oing to use sec0ndary storage devoice for
storing and accessing database.

• Less no. of models are there.

a.Unifying model
b.Frame memory model
Entity–Relationship model
• 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.
• In the following diagram we have two entities Student and College and their relationship. The
relationship between Student and College is many to one as a college can have many students
however a student cannot study in multiple colleges at the same time. Student entity has attributes
such as Stu_Id, Stu_Name & Stu_Addr and College entity has attributes such as Col_ID &
Col_Name.
Entity
• An Entity may be an object with a physical existence – a particular person, car,
house, or employee – or it may be an object with a conceptual existence – a
company, a job, or a university course.
• Representation:- Rectangle
• An Entity is an object of Entity Type and set of all entities is called as entity set.
e.g.; E1 is an entity having Entity Type Student and set of all students is called
Entity Set. In ER diagram, Entity Type is represented as
Attribute
• Attributes are the properties which define the entity type. For example, Roll_No, Name, DOB,
Age, Address, Mobile_No are the attributes which defines entity type Student.
• Representation:- oval
• Key Attribute –
The attribute which uniquely identifies each entity in the entity set is called key attribute. For
example, Roll_No will be unique for each student.
• Representation:- oval with underlying lines.

• Multivalued Attribute –
An attribute consisting more than one value for a given entity. For example, Phone_No (can be more
than one for a given student)

• Representation:- double oval


• Composite Attribute –
An attribute composed of many other attribute is called as composite attribute. For example, Address
attribute of student Entity type consists of Street, City, State, and Country.
• Representation:- oval comprising of ovals

• Derived Attribute –
An attribute which can be
derived from other attributes
of the entity type is known as
derived attribute. e.g.; Age (can
be derived from DOB).
• Representation:- dashed oval.

You might also like