CAVARA OF ALL DABA Flashcards

(27 cards)

1
Q

What are the steps in Conceptual Data Model Development?

A
  1. Determine End User Views, Outputs, & Transaction Requirements
    - End User Views: Data entry, reports, analysis.
    - Outputs: Standard reports, ad-hoc reports, real-time dashboards.
    - Transactions: Insertions, updates, deletions.
  2. Determine Entity Types (e.g., Customer, Product).
  3. Identify Relationship Types (1:1, 1:N, M:N).
  4. Identify Attributes (e.g., CustomerID, Name).
  5. Determine Attribute Domains (e.g., Email format).
  6. Determine Keys (Candidate, Primary, Alternate).
  7. Draw ER Models (entities, relationships, attributes).
  8. Check for Redundancy (normalize to 3NF).
  9. Validate Model Against User Transactions.
  10. Review with Users for feedback.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How to achieve 1NF?

A
  1. Eliminate repeating groups (one value per cell).
  2. Ensure atomic values (no lists/sets in a field).
  3. Define a primary key.

Example:
- Before: Orders(OrderID, [Product1, Product2])
- After: OrderItems(OrderID, ProductID)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Steps to reach 2NF?

A
  1. Already in 1NF.
  2. Remove partial dependencies (non-key attributes depend on full PK).

Example:
- Before: Orders(OrderID, ProductID, CustomerName)
- CustomerName depends only on OrderID (not the full PK OrderID+ProductID).
- After: Split into Orders(OrderID, CustomerName) and OrderItems(OrderID, ProductID).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How to get to 3NF?

A
  1. Already in 2NF.
  2. Remove transitive dependencies (non-key attributes depend only on PK, not other non-key fields).

Example:
- Before: Employees(EmpID, Dept, DeptLocation)
- DeptLocation depends on Dept (not directly on EmpID).
- After: Split into Employees(EmpID, Dept) and Departments(Dept, DeptLocation).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

When is a table in BCNF?

A
  1. Already in 3NF.
  2. Every determinant (left side of a functional dependency) is a superkey.

Example:
- Before: Enrollments(StudentID, Course, Professor)
- If ProfessorCourse, but Professor isn’t a superkey.
- After: Split into Professors(Professor, Course) and Enrollments(StudentID, Professor).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Key rule for 4NF?

A
  1. Already in BCNF.
  2. No multi-valued dependencies (except trivial ones).

Example:
- Before: Employees(EmpID, Skill, Language)
- Skills and languages are independent (but stored redundantly).
- After: Split into EmpSkills(EmpID, Skill) and EmpLanguages(EmpID, Language).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Final step to 5NF?

A
  1. Already in 4NF.
  2. No join dependencies (can’t split further without losing data).

Example:
- Before: Projects(Project, Employee, Tool)
- If associations only make sense when all 3 are combined (e.g., “Alice uses Hammer for Project X”).
- After: Keep as-is (if decomposing loses meaning).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Signs of poor normalization?

A
  • Repeating groups (violates 1NF).
  • Updating one record requires changing many (violates 2NF/3NF).
  • Redundant data (e.g., storing CustomerName in every order).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Database Configuration

Steps to configure a database server.

A
  1. Hardware: CPU, RAM, storage (SSD/HDD).
  2. Software: OS, DBMS (e.g., PostgreSQL), monitoring tools.
  3. Install DBMS: Follow vendor guidelines.
  4. Post-install: Configure users, permissions, backups.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Database Testing

Reasons for database testing

A

-Ensure data integrity.
- Optimize performance.
- Validate security and compliance.
- Verify CRUD operations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Database Testing
Steps in Test Case Design

A
  1. Define scenarios (valid/invalid data).
  2. Specify preconditions.
  3. Write test steps.
  4. Define expected results
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Database Security

Threats to database security

A
  • SQL injection.
  • Unauthorized access.
  • Insider threats.
  • Physical theft.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Threats to database security

Mitigation measures

A
  • Encryption (data at rest/transit).
  • Multi-factor authentication.
  • Regular patching.
  • Activity monitoring.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Data Migration

Steps in the Data Migration Process.

A
  1. Plan (scope, timeline).
  2. Assess data quality.
  3. Map fields (source → target).
  4. Select tools (ETL, replication).
  5. Test migration.
  6. Validate post-migration.
18
Q

Data Migration

Risks in data migration

A

-Data loss/corruption.
- Downtime.
- Compatibility issues.

19
Q

Backup & Recovery

Factors affecting RTO and RPO.

A
  • Backup frequency.
  • Backup type (full/incremental).
  • Infrastructure speed.
  • Data size.
20
Q

Backup & Recovery

Types of recovery techniques

A

Mirroring (real-time copies).
- Log-based recovery (replay transactions).
- Checkpointing (snapshots).

21
Q

Concurrency Control

Problems without concurrency control

A
  • Lost updates.
  • Dirty reads.
  • Non-repeatable reads.
22
Q

Concurrency Control

How does timestamp-based protocol work?

A
  • Assign unique timestamps to transactions.
  • Older transactions proceed first; conflicts trigger rollbacks.
23
Q

Deadlocks

Conditions for deadlock

A
  1. Mutual exclusion.
  2. Hold and wait.
  3. No preemption.
  4. Circular wait.
24
Q

Deadlocks

Deadlock handling strategies

A
  • Prevention (break one condition).
  • Avoidance (Banker’s algorithm).
  • Detection and recovery (abort transactions).
25
Q

Deadlock

Deadlock handling strategies

A
  • Prevention (break one condition).
  • Avoidance (Banker’s algorithm).
  • Detection and recovery (abort transactions).
26
Database Maintenance Types of database maintenance
- Backup/recovery. - Performance tuning. - Data integrity checks. - Archiving. - Security audits.
27
Database Maintenance Steps to Communicate Maintenance To Users**.
1. Notify in advance. 2. Explain impact (downtime). 3. Provide updates. 4. Post-maintenance summary.
28
**Why Normalize?**
- No duplicate data. - No update/delete anomalies. - Faster queries. - Easier to modify schema.