Dbms Mid Term
Dbms Mid Term
Keys and Integrity Rules: What is the difference between primary keys and foreign keys
in relational databases? Why are integrity constraints important, and how do they maintain
data consistency?
Selection and Projection: Using relational algebra, how would you express:
Tuple Relational Calculus: Using tuple relational calculus, write a query to find all
students enrolled in "Database Systems." Assume a relation Enrolled(StudentID,
CourseID) and Course(CourseID, CourseName).
Codd’s Rules: Briefly describe Codd’s twelve rules for relational databases. Why are
these rules foundational to relational database systems? Defin and desibe uml
Normalization Theory: Explain the differences between 1NF, 2NF, 3NF, and BCNF.
Provide examples of tables that are in 1NF but not in 2NF, and so on.
Advanced Join and Division: Write a relational algebra query using the division operator
to find customers who have ordered all products in a given Product table. Assume
Order(CustomerID, ProductID) and Product(ProductID).
Module 3-
Here are 10 questions covering relational database design, SQL features, data manipulation,
and practical queries:
9. **Triggers in SQL**
- What is a trigger in SQL, and how can it be used to enforce business rules within a
database? Write a SQL statement to create a trigger that logs an entry in a `SalaryAudit` table
whenever an employee's salary is updated.
Module 1
Here are 10 questions covering the purpose of database systems, data independence, relational
databases, database system architecture, data models, and ER modeling with practical applications:
- What are the primary purposes of a database management system (DBMS)? Describe how a
DBMS improves data management compared to a traditional file-based system. Provide examples of
real-world applications where a DBMS would be essential. Adv and dis adv
- Explain the concept of data independence in database systems. Distinguish between logical and
physical data independence and provide examples of changes that would test each type.
4. **Database Languages**
- Identify and explain the functions of the main types of database languages (DDL, DML, and DCL)
in a DBMS. Provide an example of each type in SQL and describe a scenario where each would be
used.
- What are data models in database design, and why are they important? Describe the three
degrees of data abstraction (physical, logical, and external) and give an example of how each degree
impacts database design.
- Differentiate between the roles of end-users, application developers, and the database
administrator (DBA) in a database environment. What specific tasks and responsibilities does a DBA
have in ensuring the database operates effectively?
- Describe the basic components of an Entity-Relationship (ER) model, including entities, attributes,
and relationships. Draw an ER diagram for a simple library system, showing entities for `Book`,
`Member`, and `Loan`, and specify any key constraints.
- Explain the concept of cardinality constraints in an ER diagram, and provide an example of a 1:1,
1:N, and M:N relationship. Identify common issues that might arise when mapping these
relationships to a relational schema and how they can be resolved.
- Define a weak entity set and explain why it requires an identifying relationship with a strong entity
set. Create an ER diagram involving a weak entity set `Dependent` that depends on an entity set
`Employee`, showing the identifying relationship.