CS-409 Lecture 1 to 82 - Key Points & Important Questions
1. Introduction to DBMS
- Components of DBMS
- ANSI/SPARC 3-level architecture
- Client-server models (2-tier, 3-tier)
Q: What are the three levels of DBMS architecture?
A: External, Conceptual, and Internal levels.
2. Keys in DBMS
- Super Key, Primary Key, Composite Key, Surrogated Key, Foreign Key
Q: What is a composite key?
A: A combination of two or more columns to uniquely identify a record.
3. ER Diagrams
- Entity, Attributes (Simple, Composite, Derived, Multi-valued)
- Relationship Types (1:1, 1:N, M:N)
- Weak vs Strong Entities
Q: What symbol represents a multi-valued attribute?
A: Double oval.
4. Referential Integrity Constraints
- Defining PK and FK in SQL
- Creating relational schema with constraints
Q: How do you define a foreign key in SQL?
A: FOREIGN KEY (column) REFERENCES table(column);
5. SQL Programming
- Data Types, DDL, DML commands
- Joins, Nested Queries, Views
Q: What does the JOIN clause do?
CS-409 Lecture 1 to 82 - Key Points & Important Questions
A: Combines rows from two or more tables based on a related column.
6. PL/SQL Programming
- Blocks, Procedures, Functions
- Triggers, Exception Handling
Q: What is the difference between a procedure and a function?
A: A function returns a single value, a procedure does not.
7. Cursors in PL/SQL
- Implicit and Explicit Cursors
- Cursor attributes: %ISOPEN, %FOUND, %NOTFOUND, %ROWCOUNT
Q: When is an explicit cursor used?
A: When a query returns more than one row.
8. Triggers
- BEFORE/AFTER INSERT, UPDATE, DELETE
- Trigger enabling/disabling
Q: What is the purpose of a trigger?
A: Automatically perform an action when an event occurs in the database.
9. Transactions and Concurrency
- Transaction control (COMMIT, ROLLBACK)
- ACID properties
Q: What is a transaction?
A: A unit of work that is completed entirely or not at all.
10. Tablespaces and Storage
- TEMP tablespace, Datafiles
- Data Export/Import using exp and imp
CS-409 Lecture 1 to 82 - Key Points & Important Questions
Q: Why create alternate TEMP tablespace?
A: For managing large operations or replacing existing temp tablespaces.
Sample Important Exam Questions
1. Define and differentiate between Primary Key and Surrogate Key.
2. What is the purpose of the ER Diagram in database design?
3. Explain the steps of creating and using a cursor in PL/SQL.
4. Describe ACID properties in transaction management.
5. How do you handle exceptions in PL/SQL procedures?