Professional Documents
Culture Documents
Primary key is a column or a set of columns Foreign key is a column or a set of columns
that can be used to uniquely identify a row in that refer to a primary key or a candidate key
a table of another table
A table can have a single primary key A table can have multiple foreign keys that
can references different table
18. What is referential integrity?
The referential integrity rule states that "whenever a foreign key value is used it must
reference a valid, existing primary key in the parent table".
Example: Consider the situation where you have two tables : Employees and Managers.
The Employees table has a foreign key attribute entitled Managed By, which points to the
record for each employee's manager in the Managers table.
19. What is domain integrity? Give example.
Domain integrity ensures that all the data items in a column fall within a defined
set of valid values. Each column in a table has a defined set of values, such as the set of
all numbers for zip (five-digit), the set of all character strings for name.
20. What are different types of integrity constraints used in designing relational
databases?
Different types of integrity constraints are-
(1) Entity Integrity Constraint
(2) Referential Integrity Constraint
(3) Domain Integrity Constraint
(4) Key Integrity Constraint
21. List the reasons why null value might be introduced into the database.
NULL special value provided by database in two cases-
i) When field values of some tuples are unknown (For eg. City name is not
assigned) and
ii) inapplicable (For eg. middle name is not present).
22. List various operators used in relational algebra.
Various operators used in Relational algebra are
(1) Selection Operator(σ)
(2) Projection Operator(π)
(3) Cartesian Product(×)
(4) Rename Operator(ρ)
23. Describe briefly any two undesirable properties that a database design may have.
The two undesirable properties that a database design may have -
(1) Repetition of data
(2) In-ability of representation of certain information in database.
24. Define data independence.
Data independence is an ability by which one can change the data at one level without
affecting the data at another level. Here level can be physical, conceptual or external.
25. Distinguish between physical and logical data independence.
PHYSICAL INDEPENDENCE LOGICAL INDEPENDENCE
It allows modification of physical It allows modification of conceptual schema
scheme without requiring any changes to without any changes requiring to external
the conceptual schema. schema.
For example: if there is any change in For example: Any change in the table
memory size of database server then it structure such as addition or deletion of some
will not affect the logical structure of any column does not affect user views
data object
DATABASE DESIGN
PARTA
1. What is an entity?
It is a basic object represented by E-R model
It is a thing in real world with an independent existence.
An entity can have
Physical existence - employee o Conceptual existence - company, department
For a relation state r of R, if tl and 12 are any two tuples, If tl [X]=12[X], then
tl[Y]=t2[Y]
18. What is a canonical cover (or) minimal cover and minimal set?
Minimal Cover: minimal (or) canonical cover of a set of functional dependencies E is a
set of functional dependencies F that satisfies the property that every dependency in Eis
in the closure F+ of F.
Minimal Set: A minimal set of dependencies is a set of dependencies in a standard or
canonical form and with no redundancies.
19. Define Normalization.
Normalization of data can be considered as a process of analyzing the given relation
schemas based on their functional dependencies and primary keys to achieve
the properties of
o minimizing redundancy
o minimizing the anomalies