DBMS CA3 Suggested Topics
DBMS CA3 Suggested Topics
explain each of the following concepts in dbms, with examples where necessary:-
- Introductory concepts - 3 schema architecture
- SQL types - DDL DML DCL
- ER diagram - types of attributes: Multivalued, composite, complex, derived.
- Degree and Cardinality of relation and relationships
- Concept of keys - super key, candidate key, primary key, foreign key
- Entity Integrity constraint
- Referential integrity constraint
- Weak and strong entities
The Three Schema Architecture in DBMS helps separate the database structure into three levels to
provide abstraction and data independence.
Internal Schema: The physical storage of data in memory (e.g., data files, indexes, hashing).
Conceptual Schema: The logical structure of the entire database (e.g., tables, relationships,
constraints).
External Schema: The user’s view of the data (e.g., reports, specific tables for applications).
Example:
A university database has:
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 1/7
`GRANT SELECT ON students TO user1;`
`REVOKE INSERT ON students FROM user1;`
5. Concept of Keys
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 2/7
Example:
sql
Ensures foreign key values must exist in the referenced primary key table.
Example:
sql
Conclusion
These concepts form the foundation of DBMS, ensuring structured data storage, retrieval, and integrity
across relational databases. Let me know if you need further clarification! 🚀
explain each of the following concepts in dbms, with examples where necessary:-
- EER: Generalisation specialisation
- Binary, tertiary, n-ary relationship
- Ternary to binary conversion
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 3/7
- ERD to table translation
- Simple SQL like CREATE, INSERT, UPDATE, DELETE, SELECT
- Functional dependencies, armstrongs axioms, Attribute closure
- Finding primary key for a given R with given FDs
- Normalization - 1NF, 2NF
Diagram Representation:
markdown
Vehicle
/ \
Car Bike
A ternary relationship can be converted into binary relationships by introducing an associative entity.
Example:
A `Supplier` supplies a `Product` to a `Store`.
lua
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 4/7
Store
1. Entities → Tables
`Student(student_id PRIMARY KEY, name, age)`
2. Attributes → Columns
3. Relationships → Foreign Keys
`Enrollment(student_id FOREIGN KEY REFERENCES Student(student_id), course_id FOREIGN KEY
REFERENCES Course(course_id))`
4. Multivalued Attributes → Separate Tables
`Student_Phone(student_id, phone_number)`.
sql
sql
sql
sql
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 5/7
sql
A functional dependency X → Y means that for each value of `X`, there is a unique value of `Y`.
Attribute Closure
The closure of an attribute set X, denoted as X⁺, is the set of attributes that can be functionally
determined by X.
Example:
For `R(A, B, C, D)` with FDs:
`A → B`
`B → C`
`C → D`
To find `A⁺`:
7. Finding Primary Key for Given Relation (R) with Given FDs
Steps:
Example:
Given `R(A, B, C, D, E)` with FDs:
`A → B`
`A → C`
`CD → E`
`B → D`
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 6/7
Find candidate keys:
Compute `A⁺`: `{A, B, C, D, E}` (contains all attributes, so `A` is a candidate key).
Primary Key = `{A}` (since it uniquely identifies all attributes).
scss
pgsql
scss
Conclusion
These DBMS concepts help design efficient, structured, and normalized databases. Let me know if you
need further explanations! 🚀
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 7/7