0% found this document useful (0 votes)
5 views15 pages

UNIT II DBMS QUESTIONS

The document outlines various types of keys in a Database Management System (DBMS), including primary, candidate, composite, foreign, alternate, unique, and super keys, each serving distinct roles in identifying records and establishing relationships. It also discusses entities and entity sets, differentiating between tangible and intangible entities, as well as strong and weak entities. Additionally, the document covers constraints in Entity Relationship (ER) diagrams, mapping cardinalities, participation constraints, and concepts of generalization and aggregation in ER modeling.

Uploaded by

meharkaran09
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)
5 views15 pages

UNIT II DBMS QUESTIONS

The document outlines various types of keys in a Database Management System (DBMS), including primary, candidate, composite, foreign, alternate, unique, and super keys, each serving distinct roles in identifying records and establishing relationships. It also discusses entities and entity sets, differentiating between tangible and intangible entities, as well as strong and weak entities. Additionally, the document covers constraints in Entity Relationship (ER) diagrams, mapping cardinalities, participation constraints, and concepts of generalization and aggregation in ER modeling.

Uploaded by

meharkaran09
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/ 15

UNIT II DBMS

Q1 Explain Various Keys in DBMS

In a database management system (DBMS), keys are attributes or column names that identify rows in a table or
establish relationships between tables:
Primary key
A column that uniquely identifies each record in a table. A table can have only one primary key.
• 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.

Candidate key
A set of features that can uniquely identify a table. A table can have multiple candidate keys, and a primary key is
chosen
from among them.
Composite key
A candidate key that uses multiple columns in a table to create a primary key. It is also known as a concatenated key
or composite primary key.

Foreign key
A key that connects two tables by relating the columns of the child table to the primary key in the parent table.
A database can have multiple foreign keys.

Alternate key
A candidate key that is not currently a primary key, but can work as one. It is also called a secondary key.

Unique key
A column that identifies a given entity.
Super key
A set of keys that can uniquely identify all rows in a table.
Q2 Discuss Various symbols used in ER Diagram
Q3 Discuss types of Entity .
Entity
An entity is a "thing" or "object" in the real world. An entity contains attributes, which describe that entity. So anything about which we store information is called an entity.
Entity Set
An entity set is a collection of similar types of entities that share the same attributes.
• Tangible entities
These are physical objects that can be seen, touched, or measured. Examples include people, cars, and buildings.
• Intangible entities

These are non-physical objects that cannot be directly observed or measured. Examples include login information, intellectual property, and emotions.

• Strong entities
These entities have a key attribute that uniquely identifies them. For example, an employee's employee ID is a key attribute.
• Weak entities
These entities do not have a key attribute and depend on another strong entity to be uniquely identified. For example, an installment can only exist if a loan exists.

Officer strong entity


Payment Weak Entity
Q4 Discuss Constraints in ER Diagram
Constraints are used for modeling limitations on the relations between entities.
There are two types of constraints on the Entity Relationship (ER) model −
• Mapping cardinality or cardinality ratio.
• Participation constraints.
Mapping Cardinality
It is expressed as the number of entities to which another entity can be associated via a relationship set.
• One-to-one
• One-to-many
• Many-to-one
• Many-to-many

• One-to-one relationship
• An entity set A is associated with at most one entity in B and an entity in B is associated with
at most one entity in A.

One-to-many relationship
An entity set A is associated with any number of entities in B with a possibility of zero and an entity
in B is associated with at most one entity in A.
Many-to-one relationship
An entity set A is associated with at most one entity in B and an entity set in B can be associated with any number of entiti es in A
with a possibility of zero.

Many-to-many relationship
An entity set A is associated with any number of entities in B with a possibility of zero and an entity in B is associated with any
number of entities in A with a possibility of zero.
Participation Constraints
Participate constraints are two types as mentioned below −
• Total participation
• Partial Participation
the customer to Loan is partial participation and the loan to the customer is total participation.

Total participation
The participation of an entity set E in a relationship set R is said to be total if every entity in E
Participates in at least one relationship in R.
For Example − Participation of loan in the relationship borrower is total participation.
Partial Participation
If only some of the entities in E participate in relationship R, then the participation of E in R is said to
be partial participation.
For example − Participation of customers in the relationship borrower is partial participation.
Q5 Explain Genetralization and Aggregation In ER Diagram
Or
Explain Extended ER Features
Generalization is a process of generalizing an entity which contains generalized attributes or properties
of generalized entities.

It is a Bottom up process i.e. consider we have 3 sub entities Car, Truck and Motorcycle. Now these
three entities can be generalized into one super class named as Vehicle.
Specialization is a process of identifying subsets of an entity that share some different characteristic. It
is a top down approach in which one entity is broken down into low level entity.
AGGREGATION : When an entity and relation ship together considered as higher level entity it is called as
aggregation

In below example student and project are two entity and works on is relationship .now we are considering student
,project and works on as entity this is aggregation . now we establish relationship of this entiry with teacher entity
and relation ship name is guided_by

You might also like