0% found this document useful (0 votes)
14 views20 pages

Database Management System Qb Solution-unit i(Ai -Ml)

Uploaded by

marzamacchu830
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views20 pages

Database Management System Qb Solution-unit i(Ai -Ml)

Uploaded by

marzamacchu830
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

DATABASE MANAGEMENT SYSTEM

Question Bank Solution


Unit 1
2 Marks question
1. Define Database Management System (DBMS).
Ans: A database management system (DBMS) is a collection of programs that enables
users to create and maintain a database. The DBMS hence is a general purpose
software system that facilitates the process of defining, constructing and manipulating
database for various applications.

2. Define database and metadata.


Ans: A database is a collection of related data. By data, we mean known facts that can
be recorded and that have implicit meaning. For example: names, telephone numbers,
address etc.
Metadata refers to data that describes the structure, organization, and characteristics
of the database itself. It includes information about tables, columns, indexes,
constraints, relationships, and other database objects.

3. List the functions involved in Data Base Manipulating.


Ans:Insert,select,Update,Delete,Join,Aggregate,Group by,Order by

4. Define program-data independence.


Ans: The concept of data independence can be defined as the capacity to change the
schema at one level of a database system without having to change the schema at the
next higher level.

5. Define data abstraction


Ans: Data abstraction in Database Management Systems (DBMS) refers to the
process of hiding the complexities of the data storage, organization, and retrieval
mechanisms from the users and applications. It allows users to interact with the
database at a higher level of understanding, without needing to know the intricate
details of how the data is actually stored and managed internally.

6. Mention any two responsibilities of a Database Administrator.


Ans: a)The DBA is responsible for authorizing access to the database, for
coordinating and monitoring its use and for acquiring software and hardware
resources as needed.
b)There is a need for a chief administrator to oversee and manage the resources.
7. Define End users in the Database management system. Mention any two types of
End users.
Ans: End users are the people whose jobs require access to the database for querying,
updating and generating reports. There are several categories of end-users.
Different types of End Users are
1. Casual End Users
2. Parametric End Users
3. Sophisticated End Users
4. Stand-alone End Users

8. Define redundancy.
Ans: In a Database Management System (DBMS), redundancy refers to the
unnecessary repetition or duplication of data within a database. This duplication can
lead to several issues, including increased storage costs, data inconsistency, and
higher maintenance efforts.

9. Define entity, attribute, and relationship. Give example


Ans: An entity is a real-world object or concept that can be distinctly identified and
about which data can be stored in a database. Entities are typically things like people,
places, objects, events, or concepts.
Example:Student,Car etc
An attribute is a property or characteristic of an entity. Attributes represent the
details we want to store about an entity.
Example: For the Student entity, possible attributes could
include:Student_ID,Name,DOB etc.
A relationship describes how two or more entities are related to each other.
Relationships can have various types, such as one-to-one, one-to-many, and many-to-
many.
Example: Enrollment: A relationship between the Student entity and the Course
entity. This relationship can be many-to-many because a student can enroll in multiple
courses, and each course can have multiple students enrolled in it.

10. Define database schema. What is a schema diagram?


Ans: A database schema is a blueprint or architecture of how a database is
structured. It defines how data is organized and how the relations among them are
associated.
A schema diagram is a visual representation of a database schema. It illustrates the
database's logical structure, showing tables, columns, keys, and the relationships
between the tables.

11. Define mappings.


Ans: Mapping refers to the process of translating and transforming data between
different levels of abstraction within the database architecture. These levels include
the internal (physical), conceptual (logical), and external (user view) schemas.
12. What is data independence?
Ans: The concept of data independence can be defined as the capacity to change the
schema at one level of a database system without having to change the schema at the
next higher level.

13. What is data definition language (DDL)


Ans: DDL stands for Data Definition Language. It is used to define database structure
or pattern.It is used to create schema, tables, indexes, constraints, etc. in the
database.Using the DDL statements, you can create the skeleton of the database.Data
definition language is used to store the information of metadata like the number of
tables and schemas, their names, indexes, columns in each table, constraints, etc.

14. Why storage definition language (SDL) is used?


Ans: The Storage Definition Language (SDL) is used in database management
systems (DBMS) to define the internal schema of the database. The internal schema
specifies how the data is stored in the physical storage, including details such as data
structures, file organization, indexing, and access methods.

15. What is the use of data manipulation language (DML)?


Ans: Data Manipulation Language (DML) is a subset of SQL (Structured Query
Language) used for managing and manipulating data in a database. DML provides the
commands and syntax needed to perform operations such as retrieving, inserting,
updating, and deleting data. It is a critical component of database management,
enabling users to interact with and modify the database contents.

16. Specify the use of the query compiler.


Ans: The query compiler is an essential component of a Database Management
System (DBMS) that translates high-level database queries written in SQL (Structured
Query Language) into low-level instructions that the database engine can execute.

17. Define Loading Utility and Backup Utility


Ans: Loading: A loading utility is used to load existing data files such as text files or
sequential files into the database. Usually the format of the file will be specified.
Backup: A backup utility creates a backup copy of the database, usually by dumping
the entire database onto tape. Backup copy can be used to restore the database in case
of failure.

18. Define attribute and derived attribute. Give example


Ans: An attribute is a property or characteristic of an entity. It represents the data
that is stored about an entity in a table. Each attribute corresponds to a column in a
database table.
Example:Employee_ID,Name,DOB are the attributes of Entity Employee
A derived attribute is an attribute whose value is calculated from other attributes. It
does not store the data directly in the table but derives its value through a computation
or formula based on other stored attributes.
Example:Age is Derived from DOB,Age is a derived attiribute

19. Define composite attributes and simple attributes. Give example


Ans: Composite attributes are attributes that can be divided into smaller sub-parts,
each representing a simpler attribute with its own meaning. These sub-parts can have
their own attributes.

Example: Consider an attribute Address, which includes sub-parts such as Street,


City, State, and ZipCode. Each sub-part contributes to the overall meaning of the
address attribute.
Simple attributes are indivisible and represent atomic data elements. They cannot be
further divided into smaller components within the context of the database schema.
Example: An attribute Age represents a single numerical value indicating the age of a
person. It cannot be divided into smaller components within the database schema.
20. Define atomic attributes. Give example.
Ans: Atomic attributes are fundamental properties or characteristics of an entity in a
database that cannot be divided into smaller parts. They represent the most basic form
of data that cannot be decomposed any further while still retaining meaningful
information about the entity.
Example: Email Address,Age

21. What are null-valued attributes? Give example


Ans:Null-valued attributes are attributes in a database that do not have a value for a
particular record. A null value represents the absence of a value, meaning that the
attribute has been left unspecified or is unknown for that particular record.

22. Define relationship and cardinality ratio.


Ans: A relationship refers to a connection or association between two or more
entities. Relationships represent how entities interact with each other and can be
described in a database schema to model real-world interactions.
Cardinality ratio refers to the numeric relationships between entities in a
relationship. It defines the number of instances of one entity that can be associated
with the number of instances of another entity.

23. Define the Degree of a relationship.


Ans:The degree of a relationship in the context of database design refers to the
number of entity types that participate in that relationship. It indicates how many
entities are involved in the relationship.

24. Give the notation used to represent Entity and weak entity.
Ans:
Entity:

Notation: Rectangular box


Weak Entity:

Notation:Double Rectangular Box

Questions carrying 4 or more marks

1. Explain the characteristics of the Database Approach.


Ans: A number of characteristics distinguish the database approach from the
traditional approach of programming with the files.
Database approach has the following characteristics
1. Insulation between Program Data and Data Abstraction
2. Support Multiple Views of the Data
3. Insulation between Program Data and Data Abstraction
4. Sharing of Data and Multi-user Transaction Processing
5. Database approach has the following characteristics

1. Insulation between Program Data and Data Abstraction


The database contains not only the data but also a complete definition or
description of the database structure and constraints. This definition is stored in
the system catalog, which contains information such as structure of files, type and
storage format of each data item and various constraints on the data. The
information stored in the catalog is called meta-data, and it describes the structure
of primary database.
2. Support Multiple Views of the Data
A database typically has many users, each of whom may require a different
perspective or view of the database. A view may be a subset of the database or it
may contain virtual data that is derived from the database files but not explicitly
stored. A multi-user DBMS whose users have a variety of applications must
provide facilities for defining multiple views.
3. Insulation between Program Data and Data Abstraction
In traditional file processing, the structure of data files is embedded in the
access programs, so any changes to the structure of a file may require change in
all the programs that access the file. In DBMS, the structure of the database is
stored in the system catalog separately from the access programs. If the structure
of the database is to be changed, all the access programs need not be changed.
This is called as program data independence.
In object – oriented and object – relational databases, users can define
operations on data as part of the database definitions. An operation (also called
function) is specified in two parts. The interface (or signature) of an operation
includes the operation name and the data types of its arguments (or parameters).
The implementation (or method) of the operation is specified separately and can
be changed without affecting the interface. User application programs can operate
on the data by invoking these operations through their names and arguments,
regardless of how the operations are involved. This is known as program –
operation independence.
The characteristic that allows program-data independence and program-
operation independence is called, data abstraction. A DBMS provides users with
conceptual representation of data that does not include many of the details of how
the data is stored or how the operations are implemented. A data model is a type
of data abstraction that is used to provide the conceptual representation. The data
model hides storage and implementation details that are not of interest to most of
the database users.
4. Sharing of Data and Multi-user Transaction Processing
A multi-user DBMS as its name implies, must allow multiple users to access the
database at the same time. This is essential if the data for multiple applications is
to be integrated and maintained in a single database. The DBMS must include
concurrency control software to ensure that several users trying to update the same
data do so in a controlled manner so that the result of the updates is correct. For
example, when several reservation clerks try to assign a seat, the DBMS should
ensure that each seat can be accessed by only one clerk at a time for assignment to
a passenger. These types of applications are called on-line transaction processing
(OLTP) applications.

2. Explain the roles of Database Administrator (DBA) and Database Designer.


Ans: Database Administrators
In any organization where many persons use the same resources, there is a need for a
chief administrator to oversee and manage the resources. In a database environment,
the primary resource is the database itself and the secondary resource is the DBMS
and related software. Administering these resources is the responsibility of the
database administrator (DBA). The DBA is responsible for authorizing access to the
database, for coordinating and monitoring its use and for acquiring software and
hardware resources as needed.

Database Designers
Database designers are responsible for identifying the data to be stored in the database
and for choosing the appropriate structure to represent and store this data. These tasks
are usually undertaken before the database is actually implemented and populated
with data. It is the responsibility of the database designers to communicate with all
database users, in order to understand their requirements, and to come up with a
design that meets these requirements.

3. List and explain various categories of End users.


Ans: End users are the people whose jobs require access to the database for querying,
updating and generating reports. There are several categories of end-users.
 Casual End Users: They occasionally access the database, but they may need
different information each time. They use a sophisticated database query
language to specify their requests and are typically middle or high-level
managers.
 Parametric End Users: Their main job function revolves around constantly
querying and updating the database, using standard types of queries. These
transactions are called as canned transactions that have been carefully
programmed and tested. For example, Reservation clerks for airline or hotels
check the availability for a given request and make reservations.
 Sophisticated End Users: This category includes engineers, scientists business
analysts etc. who thoroughly familiarize themselves with the facilities of
DBMS so as to implement their applications to meet their complex
requirements.
 Stand-alone End Users: They maintain personal databases by using ready-
made program packages that provide easy-to-use menu or graphics-based
interfaces.

4. Explain the categories of data models.

Ans: Data models can be categorized according to the types of concepts they use to
describe the database structure. High-level or conceptual data models provide
concepts that are close to the way many users perceive data, where as low-level or
physical data models provide concepts that describe the details of how data is stored
in the computer. Between these two extremes is a class of representational (or
implementation) data models, which provide concepts that may be understood by end-
users, hide some details of the data storage but can be implemented on a computer in
a direct way.

Conceptual data models use concepts such as entities, attributes and relationships. An
entity represents a real world object or concept, such as an employee or a project that
is described in a database. An attribute represents some property of interest that
further describes an entity, such as an employee’s name or salary. A relationship
among two or more entities represents an interaction among the entities; for example,
a works – on relationship between an employee and a project.

Representational or implementation data models are the models used most frequently
in traditional database management systems, and they include relational data model,
network and hierarchical model. Representational data models represent data by using
record structures and hence are sometimes called as record-based data models.

Physical data models describe how data is stored in the computer by representing
information such as record formats, record ordering and access paths. An access path
is a structure that makes the search for particular database records efficient.

5. Explain the advantages of the database approach.

Ans: There are many advantages and capabilities of using a good DBMS.

1. Controlling Redundancy

Redundancy is nothing but storing same data repeatedly. In database approach a


huge repository of data is stored and users are allowed to access the data which is
relevant to them there by controlling the redundancy.

2. Restricting Unauthorized Access

When multiple users share a database, it is likely that some users will not be
authorized to access all information in the database and hence only authorized
persons are allowed to access the data. In addition to this, some users may be
permitted only to retrieve data, where as others are allowed both to access,
retrieve and update. Hence the type of access operation must be controlled. and
DBMS should provide a security and authorization subsystem to specify access
restrictions to various users.

3. Providing Persistent Storage for Program Objects and Data Structures

Databases can be used to provide persistent storage for program objects and data
structures so that the user of the database can store any amount of data in the
database for further use.

4. Providing Multiple User Interfaces:

Because many types of users with varying levels of technical knowledge use a
database, a DBMS should provide a variety of user interfaces. These include
query languages for casual users; programming language interfaces for application
programmers; forms and command codes for parametric users; and menu-driven
interfaces and natural language interfaces for stand-alone users. Both forms – style
interfaces and menu – driven interfaces are commonly known as graphical user
interfaces (GUIs).

5. Representing Complex Relationships among Data

A database may include numerous varieties of data that are interrelated in many
ways. A DBMS must have the capability to represent variety of complex
relationships among the data as well as to retrieve and update related data easily
and efficiently.

6. Enforcing Integrity Constraints

Most database applications have certain integrity constraints that must be enforced
on the data to be stored in the table. The data that satisfies the integrity constraint
will be stored in the table for the further use, the data that fails to satisfy the
integrity constraints will be rejected to ensure consistency.

7. Providing Backup and Recovery

A DBMS must provide facilities for recovering from hardware and software
failures. The backup and recovery subsystem of the DBMS is responsible for
recovery.

6. Explain different categories of DBMS

Ans: Several criteria are normally used to classify database management systems. The
first is the data model on which the DBMS is based. The two types of data models are
the relational data model and the object data model. Many applications still run on the
database system based on hierarchical and network model. The wide use of relational
model led to a new class of DBMS known as object-relational DBMS.
We can categorize DBMSs based on the data model: relational, object, object –
relational, hierarchical, network etc. The second criterion used to classify database
management systems is the number of users supported by the system. Single-user
systems support only one user at a time and multi-user systems support multiple users
concurrently.

Third criterion is the number of sites over which the database is distributed. A DBMS
is centralized if the data is stored in a single system. A distributed DBMS (DDBMS)
can have databases distributed over many sites. We can also classify the DBMS on
the basic of types of access paths as general purpose DBMS and a special purpose
DBMS.

7. Explain the 3-schema architecture of DBMS with a neat diagram.

Ans:

The three schema architecture is illustrated in the Figure 1. In this architecture,


schemas can be defined at the following three levels.

▪ The internal level has an internal schema, which describes the physical storage
structure of the database. The internal schema uses a physical data model and
describes the complete details of data storage and access paths for the database.

▪ The conceptual level has a conceptual schema, which describes the structure of the
whole database for a community of users. The conceptual schema hides the details of
the physical storage structures and concentrates on describing entities, data types,
relationships, user operations and constraints. A high – level data model or an
implementation data model can be used at this level.

▪ The external or view level includes a number of external schemas or user views.
Each external schema describes the part of the database that a particular user group is
interested in and hides the rest of the database from that user group. A high – level
data model or an implementation data model can be used at this level.

8. Write a note on different types of data independence.

Ans: The concept of data independence can be defined as the capacity to change the
schema at one level of a database system without having to change the schema at the next
higher level. There are two types of data independence.

1. Logical Data Independence: It is the capacity to change the conceptual schema without
having to change the external schemas or application programs. We may change the
conceptual schema to expand the database (by adding records) or to reduce the database
(by removing records). Changes to constraints can be applied also to the conceptual
schema without affecting the external schemas or application programs.

2. Physical Data Independence: It is the capacity to change the internal schema without
having to change the conceptual or external schemas. Changes to the internal schema may
be needed because some physical files need to be reorganized – for example, by creating
additional access structures – to improve the performance of retrieval or update. If the
same data remains in the database, we should not have to change the conceptual schema.

9. Explain the Role name and Recursive Relationship with an example

Ans:Role Name

In the context of a relational data model, a role name is used to clarify the function of an
entity in a relationship, especially when the same entity type participates more than once
in a relationship. This is particularly useful in self-referencing or recursive relationships
where the same entity type is related to itself in different roles.

Recursive Relationship

A recursive relationship occurs when an entity is related to itself. This type of


relationship is also known as a self-referential relationship. It can describe hierarchical
structures, such as organizational charts, file directories, or parts in a bill of materials.

Example: Employee: This entity has attributes such as EmployeeID, Name,


Position, and ManagerID.
Roles Name:
In a recursive relationship where an employee can manage other employees, we need
to clarify the roles each employee plays in this relationship. One role is the "Manager"
and other one is Employee.
Recursive Relationship:
An employee can be related to another employee as a manager. Thus, we have a one-
to-many relationship where one employee (Manager) can manage multiple employees
(Subordinates).
Table Structure:

In this table:
 ManagerID is a foreign key that references EmployeeID within the same table.
 ManagerID is used to establish the recursive relationship.

10. Explain the Relationship Type and cardinality ratio with an example.
Ans: A relationship is used to describe the relation between entities. Diamond or
rhombus is used to represent the relationship.

Cardinality ratios are used to describe the numerical relationships between entities in
an ER diagram. These ratios determine the number of instances of one entity that can
or must be associated with each instance of another entity.

Types of relationship
a. One-to-One Relationship
b. One-to-many relationship
c. Many-to-one relationship
d. Many-to-many relationship

a. One-to-One Relationship
When only one instance of an entity is associated with the relationship, then it
is known as one to one relationship.
b. One-to-many relationship
When only one instance of the entity on the left, and more than one instance of
an entity on the right associates with the relationship then this is known as a
one-to-many relationship.
For example, Scientist can invent many inventions, but the invention is done
by the only specific scientist.

c. Many-to-one relationship
When more than one instance of the entity on the left, and only one instance of
an entity on the right associates with the relationship then it is known as a
many-to-one relationship.
For example, Student enrolls for only one course, but a course can have many
students

d. Many-to-many relationship
When more than one instance of the entity on the left, and more than one
instance of an entity on the right associates with the relationship then it is
known as a many-to-many relationship.
For example, Employee can assign by many projects and project can have
many employees.

11. Explain weak entity type with example.


Ans: A weak entity type in a database is an entity that cannot be uniquely identified
by its own attributes alone and therefore depends on a strong or owner entity for its
identification. A weak entity has a partial key, which is an attribute or a set of
attributes that can uniquely identify weak entities only when combined with the
primary key of the strong entity.

Example:
Weak entities are represented with double rectangular box in the ER Diagram and
the identifying relationships are represented with double diamond. Partial Key
attributes are represented with dotted lines.
In the above ER Diagram, ‘Loan’ is the weak entity.

12. Write a short note on database languages.

DDL
DDL stands for Data Definition Language. It is used to define database structure or
pattern.It is used to create schema, tables, indexes, constraints, etc. in the
database.Using the DDL statements, you can create the skeleton of the database.Data
definition language is used to store the information of metadata like the number of
tables and schemas, their names, indexes, columns in each table, constraints, etc.

 Create: It is used to create objects in the database.


 Alter: It is used to alter the structure of the database.
 Drop: It is used to delete objects from the database.
 Truncate: It is used to remove all records from a table.
 Rename: It is used to rename an object.
 Comment: It is used to comment on the data dictionary.

DCL

DCL stands for Data Control Language. It is used to retrieve the stored or saved
data.The DCL execution is transactional. It also has rollback parameters. Some tasks
that come under DCL:
• Grant: It is used to give user access privileges to a database.

• Revoke: It is used to take back permissions from the user.

DML

DML stands for Data Manipulation Language. It is used for accessing and
manipulating data in a database. It handles user requests.

Some tasks that come under DML:

• Select: It is used to retrieve data from a database.

• Insert: It is used to insert data into a table.

• Update: It is used to update existing data within a table.

• Delete: It is used to delete all records from a table.

• Merge: It performs UPSERT operation, i.e., insert or update operations.

TCL

TCL is used to run the changes made by the DML statement. TCL can be grouped
into a logical transaction. Some tasks that come under TCL:

• Commit: It is used to save the transaction on the database.

• Rollback: It is used to restore the database to original since the last Commit

13. List and explain the different types of DBMS interfaces.


Ans: User-friendly interfaces provided by a DBMS may include the following:
• Menu - Based Interfaces: These interfaces present the user with lists of options
called menus, which lead the user through the information request. Menus do away
with the need to memorize the specific commands and syntax of a query language;
rather the query is composed step by step by picking options from a menu that is
displayed by the system.
• Forms - Based interfaces: A form-based interface displays a form to each user. Users
can fill out all the form entries to insert new data, or they fill out only certain entries,
in which case the DBMS will retrieve matching data from the remaining entries.
Forms are usually designed and programmed for parametric end users and they are
suitable for canned transactions.
• Graphical-User Interfaces: A graphical user interface (GUI) typically displays the
schema to the user in diagrammatic form. The user can then specify a query by
manipulating the diagram. The users can specify their query by using pointing device
say mouse to pick certain parts of the displayed diagram.
• Natural Language Interfaces: These interfaces accept requests written in English or
some other language and attempt to understand them.
• Interfaces for Parametric Users: Parametric users such as bank tellers, often have a
small set of operations that must be perform repeatedly. Usually, these interfaces are
to be programmed and tested before actually put into operation and they allow the
parametric end users to proceed with the canned transactions with minimum number
of keystrokes.
• Interfaces for DBA: These interfaces include commands for creating accounts,
setting system parameters, granting account authorization, changing a schema and
reorganizing the storage structures of a database.

14. Explain the DBMS component Module

The database and DBMS catalog is usually stored on the disk. Access to disk is
controlled by the operating system, which schedules disk, input-output devices. A
high level stored data manager module of DBMS controls access to DBMS
information that is stored on the disk.

The dotted lines and the circles marked with A, B, C, D and E illustrate the accesses
under the control of the stored data manager.

The DDL compiler processes schema definitions and stores the descriptions of the
schemas (meta- data) in the system catalog. The catalog includes information such as
file names, data items, storage information etc. The run-time database processor
handles database access at runtime; it receives the retrieval or update operations and
carries them out on the database.

Access to disk goes through stored data manager. A query compiler handles high-
level queries that are placed interactively. The pre –compiler extracts DML
commands from an application program written in a host programming language.
These commands are sent to the DML compiler for compilation into objects code for
database access.

15. With a diagram illustrate the main phases of database design.


Ans:

The first step shown is requirements collection and analysis. During this step, the
database designers interview prospective database users to understand and document
their data requirements.

Once all the requirements have been collected and analyzed, the next step is to create
a conceptual schema for the database, using a high-level conceptual data model. This
step is called conceptual design. The conceptual schema is concise description of the
data requirements of the users and include detailed descriptions of the entity types,
relationships and constraints; these are expressed using the concepts provided by the
high-level data model. Because these concepts do not include implementation details,
they are usually easier to understand and can be used to communicate with
nontechnical users.
The next step in database design is the actual implementation of the database, using
commercial DBMS. Most current commercial DBMSs use an implementation data
model- such as the relational or the object database model- so the conceptual schema
is transformed from the high- level data model into the implementation data model.
This step is called logical design or data model mapping, and its result is a database
schema in the implementation data model of the DBMS.

Finally, the last step is the physical design phase, during which the internal storage
structures, access path and file organizations for the database files are specified. In
parallel with these activities, application programs are designed and implanted as the
database transactions corresponding to the high-level transaction specifications.

16. Explain the various types of attributes.


Ans: An attribute is a property or characteristic of an entity. An entity may contain
any number of attributes.
Types of attributes
Simple attribute :
An attribute that cannot be further subdivided into components is a simple attribute.
Example: The roll number of a student, the id number of an employee.
Composite attribute :
An attribute that can be split into components is a composite attribute.
Example: The address can be further split into house number, street number, city,
state, country, and pin code, the name can also be split into first name middle name,
and last name.
Single-valued attribute :
The attribute which takes up only a single value for each entity instance is a single-
valued attribute.
Example: The age of a student.
Multi-valued attribute :
The attribute which takes up more than a single value for each entity instance is a
multi-valued attribute.
Example: Phone number of a student: Landline and mobile.
Derived attribute :
An attribute that can be derived from other attributes is derived attributes.
Example: Total and average marks of a student.
Complex attribute :
Those attributes, which can be formed by the nesting of composite and multi-valued
attributes, are called “Complex Attributes“. These attributes are rarely
used in DBMS(DataBase Management System). That’s why they are not so popular.

Stored attribute:

The stored attribute are those attribute which doesn’t require any type of further
update since they are stored in the database.
Example: DOB(Date of birth) is the stored attribute.
Key attribute:

Key attributes are those attributes that can uniquely identify the entity in the entity
set.
Example: Roll-No is the key attribute because it can uniquely identify the student.

17. Describe the various symbols used in an ER diagram with an example.


Ans:

1.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.

2. Attributes
Attributes are the properties that define the entity type. For example, Roll_No, Name,
DOB, Age, Address, and Mobile_No are the attributes that define entity type Student.
In ER diagram, the attribute is represented by an oval.

a. Key Attribute
The attribute which uniquely identifies each entity in the entity set is called
the key attribute. For example, Roll_No will be unique for each student. In ER
diagram, the key attribute is represented by an oval with underlying lines.
b. Composite Attribute
An attribute composed of many other attributes is called a composite
attribute. For example, the Address attribute of the student Entity type consists
of Street, City, State, and Country. In ER diagram, the composite attribute is
represented by an oval comprising of ovals.

c. Multivalued Attribute
An attribute consisting of more than one value for a given entity. For example,
Phone_No (can be more than one for a given student). In ER diagram, a
multivalued attribute is represented by a double oval.

d. Derived Attribute
An attribute that can be derived from other attributes of the entity type is
known as a derived attribute. e.g.; Age (can be derived from DOB). In ER
diagram, the derived attribute is represented by a dashed oval.
3. Relationship Type and Relationship Set
A Relationship Type represents the association between entity types. For
example, ‘Enrolled in’ is a relationship type that exists between entity type
Student and Course. In ER diagram, the relationship type is represented by a
diamond and connecting the entities with lines.

4. Weak Entity
An Entity type has a key attribute that uniquely identifies each entity in the
entity set. But some entity type exists for which key attributes can’t be defined. These
are called Weak Entity types.
A weak entity type is represented by a Double Rectangle. The participation of weak
entity types is always total. The relationship between the weak entity type and its
identifying strong entity type is called identifying relationship and it is represented by
a double diamond.

You might also like