Question-1) Explain vaious anomalies in relational model?
Answer)
a). Insertion anomaly
Insertion of a tuple is not possible in the referencing relation if the referencing attribute of the tuple is not present in the referenced relation. This is called an insertion anomaly.
b). Deletion anomaly
Deletion anomaly occurs in the referenced relation. A tuple in the referenced relation cannot be deleted if the referencing attribute is used by the referencing relation. This is called deletion anomaly.
c). Updation anomaly
Updation anomaly occurs in the referenced relation. A tuple in the referenced relation cannot be updated if the referencing attribute is used by the referencing relation. This is called updation anomaly.
Question-2) What do you understand by referential integrity?
Ansnwer) Referential integrity is used to establish relationships between tables in a relational database. The primary key and the foreign key are used to maintain referential integrity between the tables. Referential integrity is achieved by the following two constraints:
1. The addition of any row in the referencing table can be done only if the corresponding primary key is present in the referenced relation.
2. The deletion of any row in the referenced table can be done only if all the records with the corresponding foreign key in the referencing relation are deleted.
Question-3) Define Relational Database.
Answer) A relational database is a type of database that stores it’s data in the form of tables that are related to one another. Each table in the relational database is divided into rows and columns.
Question-4) Explain Relational Database Management System in detail.
Answer) A Relational Database Management System is a software system that is used to manage the relational database. It helps us to access the database using queries. It allows us to execute SQL queries to perform insertion, deletion, and updation operations on the relational database.
Examples: MySQL, Oracle etc.,
Question-5) What are the advantages of using Relational Database?
Answer) The following are the advantages of using a relational database:
1. A relational database consists of data in the form of tables that are easy to interpret.
2. Insertion, deletion, and updation operations can be performed easily.
3. Redundant data can be removed easily.
4. The implementation cost is less.
5. Availability of standard design tools to implement a relational database.
6. Join operations can be performed easily.
Question-6) What are the CODD Rules for a Relational Database?
Answer) a. Foundation Rule
1. The RDBMS must be capable of managing the entire database.
b. Information Rule
i. Data stored must be a value of some cell in the table
c. Guaranteed Access Rule
1. Every data element must be accessible by the table name, its primary key, and the name of the attribute whose value to be determined.
d. Systematic Treatment of NULL
1. NULL values must only correspond to missing, unknown, or not applicable values
e. Active Online Catalog
1. The database schema must be stored in an online catalog, so that the authorized users can view the structure of the database.
f. Comprehensive Data Sub-language Rule
1. The database must be accessible by a language
g. View Updating Rule
1. Views created for various purposes must be automatically updatable to the system
h. High-level insert, update and delete rule
1. The database should support insert, delete, update operations
2. The database should also support set operations like union, intersection, and minus
i. Physical data independence
1. The conceptual or external view of data must not be affected by changes in the physical location of the tables and their indexes.
j. Logical data independence
1. Addition or deletion of attributes of a relation must not affect the user’s view of the table
k. Integrity independence
1. Modification of integrity constraints should not enforce modification at the application level
l. Distribution independence
1. Data distribution over various locations should not be visible to end-users
m. Non-Subversion Rule
1. Integrity rules should not be subverted or bypassed by low-level access.
Question-7) What are the Constraints in Relational Database Model.
Answer) Constraints in DBMS-
a.Relational constraints are the restrictions imposed on the database contents and operations.
b.They ensure the correctness of data in the database.
Types of Constraints in DBMS-
In DBMS, there are following 5 different types of relational constraints-
1. Domain constraint
2.Tuple Uniqueness constraint
3. Key constraint
4.Entity Integrity constraint
5.Referential Integrity constraint
Domain Constraint-
1. Domain constraint defines the domain or set of values for an attribute.
2.It specifies that the value taken by the attribute must be the atomic value from its domain.
Tuple Uniqueness Constraint-
1.Tuple Uniqueness constraint specifies that all the tuples must be necessarily unique in any relation.
Key Constraint-
1.Key constraint specifies that in any relation-
2.All the values of primary key must be unique.
3.The value of primary key must not be null.
Entity Integrity Constraint-
1.Entity integrity constraint specifies that no attribute of primary key must contain a null value in any relation.
2.This is because the presence of null value in the primary key violates the uniqueness property.
Referential Integrity Constraint-
1.This constraint is enforced when a foreign key references the primary key of a relation.
2.It specifies that all the values taken by the foreign key must either be available in the relation of the primary key or be null.
Question-8) Explain insertion, deletion and updation anomalies in Relational Database.
Answer) a. Insertion anomaly
Insertion of a tuple is not possible in the referencing relation if the referencing attribute of the tuple is not present in the referenced relation. This is called an insertion anomaly.
b. Deletion anomaly
Deletion anomaly occurs in the referenced relation. A tuple in the referenced relation cannot be deleted if the referencing attribute is used by the referencing relation. This is called deletion anomaly.
c. Updation anomaly
Updation anomaly occurs in the referenced relation. A tuple in the referenced relation cannot be updated if the referencing attribute is used by the referencing relation. This is called updation anomaly.
Question-9) Define attribute and tuple in Relational Database.
Answer) Attribute
A column in a relation is called an attribute. The attributes define the properties all the items in the table.
Tuple
The rows or records in a table are called tuples. The tuples are characterized by the attributes.
Question-10) Define cardinality and degree of a Relational Database.
Answer) Cardinality
Cardinality of a relation is the number of rows or tuples in that relation.
Degree
Degree of a relation refers to the number of columns or attributes in that relation.
Comments