WHAT IS TUPLE?
ROW
A named column in a relational table that holds a specific type of data
ATTRIBUTE
What is a (natural) join?
This operation combines two tables based on a related column, producing a new table with matched rows.
This rule states that every non-primary-key attribute must be functionally dependent on the entire primary key (not just part of it).
2NF
what is the sequence of operations performed as a single logical unit of work.
Transaction
WHAT IS ENTITY
REAL WORLD OBJECT
WHAT IS A RELATION IN CONTEXT OF DBMS
TABLE WITH ROWS & COLUMNS
Name any two types of joins.
inner join
outer join
Natural join/Equi join/cross join
left outer/right outer/full outer
A relation is in this normal form if it has no transitive dependencies and is already in 2NF
3NF
What does the atomicity property ensure in a transaction?
It ensures that either all operations in a transaction are performed or none are.
WHAT IS PRIMARY KEY?
IT IS A KEY THAT ACCEPT UNIQUE DATA WITH NO NULL VALUES
Given a relation STUDENT(SID, Name, Dept, Age), identify a suitable primary key
SID is the primary key as it uniquely identifies each student.
Explain the difference between inner join and outer join.
Inner join returns only matching rows; outer join returns matching rows plus non-matching rows with NULLs.
What is the main requirement for a table to be in 1NF?
All attributes must have atomic (indivisible) values.
Apply the concept of a transaction to an ATM withdrawal.
Deduct money from account → Update balance → Print receipt — all must succeed together or fail completely.
Explain the difference between a super key and a candidate key.
A super key is any set of attributes that uniquely identifies a tuple. A candidate key is a minimal super key.
Apply the concept of foreign key in a relation COURSE(CID, Title, SID). What is the foreign key?
SID is a foreign key referencing STUDENT(SID).
Apply a LEFT JOIN between EMP(EID, Name) and DEPT(DID, EID) to get all employees with or without department.
Apply 2NF to this table: Order(OrderID, ProductID, ProductName, Qty)
Orders(OrderID)
Products(ProductID, ProductName)
OrderDetails(OrderID, ProductID, Qty)
Analyze the result if isolation is not maintained in concurrent transactions.
It can lead to problems like dirty read, lost update, or phantom read.
Why is normalization important in relational databases?
Normalization eliminates redundancy and maintains data integrity.
Design a relational schema for an online bookstore with customers, orders, books, and reviews.
CUSTOMER(CID, Name, Email)
BOOK(BID, Title, Author, Price)
ORDER(OID, CID, Date)
ORDER_DETAILS(OID, BID, Quantity)
REVIEW(RID, CID, BID, Rating, Comment)
Create a query to list all employees and their project names, including those not assigned any project.
Should every database be normalized to 5NF? Why or why not?
Not always. It depends on application requirements. Over-normalization can reduce performance.
Design a transaction for transferring money from Account A to Account B with proper checks.
Check balance of A
Deduct amount from A
Add amount to B
Commit transaction