1. Write a note on BCNF form.
• BCNF is a higher version of the Third Normal Form (3NF) used in database design to
eliminate redundancy and ensure that the database schema is free from undesirable anomalies.
2. Compare subtypes and supertypes.
-Supertype
• A supertype is a parent entity that defines a set of common attributes that are inherited by its
subtypes.
• The supertype has attributes that are shared across all its subtypes.
-Subtype:
• A subtype is a child entity that specializes the supertype, inheriting its common attributes but
also adding its own specific attributes.
• A subtype has its own specific attributes in addition to those inherited from the supertype.
3. Define granularity.
• Granularity refers to the level of detail or depth at which data is stored in a database. It
defines how fine or coarse the data representation is in terms of individual records or entities.
• The more granular the data, the more detailed each piece of information will be, and vice
versa.
4. Define object relational database.
• An Object-Relational Database (ORDB) is a type of database that integrates features of both
relational databases and object-oriented databases.
• It extends the traditional relational model by incorporating object-oriented concepts
5. Define transaction.
• A transaction is a sequence of one or more operations that are executed as a single unit of
work.
• A transaction ensures that the database moves from one consistent state to another, adhering
to the principles of ACID (Atomicity, Consistency, Isolation, and Durability).
6. Give the transaction table for transferring money from account A to account b.
7. List out the ACID property.
• Atomicity: Ensures that a transaction is treated as a single unit of work.
• Consistency: Ensures that a transaction brings the database from one valid state to another
valid state.
• Isolation: Ensures that transactions are executed in isolation from each other.
• Durability: Ensures that once a transaction is committed, its changes are permanent.
8. List the desirable properties of decomposition.
• when decomposing a relation into smaller relations, the decomposition should have the
following desirable properties:
• Lossless Join: Ensures that no information is lost during the decomposition.
• Dependency Preservation: Ensures that all functional dependencies of the original relation are
preserved in the decomposed relations.
9. State the CAP theorem in NOSQL.
• CAP theorem or Eric Brewers theorem states that we can only achieve at most two out of
three guarantees for a database: Consistency, Availability, and Partition Tolerance.
10. What are the different modes of lock?
• Shared Lock (S-lock): Allows multiple transactions to read a data item simultaneously, but
prevents any transaction from modifying the data until the lock is released.
• Exclusive Lock (X-lock): Prevents other transactions from reading or modifying the locked
data item.
11. When to use SQL and NOSQL?
• SQL databases are ideal for handling structured data with tables, rows, and columns.
• When data consistency and transactional integrity are crucial, and you need strong ACID
properties use SQL
• When your data is unstructured or semi-structured use NOSQL
• When you need to scale out horizontally across many servers to handle large volumes of data
or traffic, especially in real-time applications use NOSQL
12. Why must lock and unlock be atomic operations?
• In database design, lock and unlock operations must be atomic to ensure data consistency and
transaction integrity.
• it becomes possible for two or more transactions to obtain an exclusive lock on a single data
item.
• Not only will this be against the principle of two-phase locking but can create havoc with data
consistency and integrity
13. Write the advantages of object-oriented model.
• Better Representation of Complex Data
• Support for Inheritance
• Code Reusability
• Flexibility in Schema Evolution
• Improved Data Integrity
• Object Persistence