Imp Dbms
Imp Dbms
1. Entity Types:
- Weak Entity Types: Cannot be uniquely identified by its attributes alone and relies on a "strong" or
owner entity.
2. Entity Sets:
3. Keys:
- Super Key: A set of one or more columns that can uniquely identify a row in a table.
4. Relationship Constraints:
- Cardinality: Defines the number of instances of one entity that can be associated with one
instance of another entity.
- One-to-One (1:1): A single entity instance in one entity class is related to a single entity instance
in another entity class.
- One-to-Many (1:N): A single entity instance in one entity class is related to multiple entity
instances in another entity class.
- Many-to-Many (M:N): Multiple instances in one entity class are related to multiple instances in
another entity class.
5. Participation Constraints:
- Total Participation: Every entity in the entity set must participate in at least one relationship in
that relationship set.
- Partial Participation: Some entities may not participate in any relationship in that relationship set.
b) Characteristics of Databases (5 Marks)
1. Data Abstraction:
- Levels:
2. Data Independence:
- Logical Data Independence: The capacity to change the conceptual schema without having to
change external schemas or application programs.
- Physical Data Independence: The capacity to change the internal schema without having to
change the conceptual schema.
- Group By Clause: Groups rows sharing a property so aggregate functions can be applied to each
group.
```sql
FROM employees
GROUP BY department
```
- Normalization Forms: 1NF, 2NF, 3NF, BCNF to reduce redundancy and avoid anomalies.
Question 2 (Any 4)
1. DBMS:
2. File System:
- Deadlock Prevention: Ensuring the system does not enter a deadlock state (e.g., Resource
Ordering).
Question 3
2. EER Diagram: Enhanced ER model, includes additional concepts like specialization, generalization,
and aggregation.
Example Diagram:
Question 4
2. Second Normal Form (2NF): Meet all requirements of 1NF and every non-key attribute is fully
functional dependent on the primary key.
3. Third Normal Form (3NF): Meet all requirements of 2NF and all attributes are functionally
dependent only on the primary key.
Question 5
2. ACID Properties:
- Consistency: The database remains in a consistent state before and after the transaction.
- Isolation: Intermediate transaction results are not visible outside the transaction.
- Durability: Once a transaction is committed, it will remain so, even in the event of a system failure.
Question 6 (Any 4)
- Undo/Redo Logs: Track changes so they can be reversed (undo) or reapplied (redo) during recovery.
- Views: Virtual tables representing subsets of data from one or more tables.
```sql
FROM employees
```
- Single-Valued: Holds a single value for an entity (e.g., Social Security Number).