CAVARA OF ALL DABA Flashcards
(27 cards)
What are the steps in Conceptual Data Model Development?
- 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. - Determine Entity Types (e.g., Customer, Product).
- Identify Relationship Types (1:1, 1:N, M:N).
- Identify Attributes (e.g., CustomerID, Name).
- Determine Attribute Domains (e.g., Email format).
- Determine Keys (Candidate, Primary, Alternate).
- Draw ER Models (entities, relationships, attributes).
- Check for Redundancy (normalize to 3NF).
- Validate Model Against User Transactions.
- Review with Users for feedback.
How to achieve 1NF?
- Eliminate repeating groups (one value per cell).
- Ensure atomic values (no lists/sets in a field).
- Define a primary key.
Example:
- Before: Orders(OrderID, [Product1, Product2])
- After: OrderItems(OrderID, ProductID)
Steps to reach 2NF?
- Already in 1NF.
- 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 to get to 3NF?
- Already in 2NF.
- 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)
.
When is a table in BCNF?
- Already in 3NF.
- Every determinant (left side of a functional dependency) is a superkey.
Example:
- Before: Enrollments(StudentID, Course, Professor)
- If Professor
→ Course
, but Professor
isn’t a superkey.
- After: Split into Professors(Professor, Course)
and Enrollments(StudentID, Professor)
.
Key rule for 4NF?
- Already in BCNF.
- 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)
.
Final step to 5NF?
- Already in 4NF.
- 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).
Signs of poor normalization?
- Repeating groups (violates 1NF).
- Updating one record requires changing many (violates 2NF/3NF).
- Redundant data (e.g., storing
CustomerName
in every order).
Database Configuration
Steps to configure a database server.
- Hardware: CPU, RAM, storage (SSD/HDD).
- Software: OS, DBMS (e.g., PostgreSQL), monitoring tools.
- Install DBMS: Follow vendor guidelines.
- Post-install: Configure users, permissions, backups.
Database Testing
Reasons for database testing
-Ensure data integrity.
- Optimize performance.
- Validate security and compliance.
- Verify CRUD operations.
Database Testing
Steps in Test Case Design
- Define scenarios (valid/invalid data).
- Specify preconditions.
- Write test steps.
- Define expected results
Database Security
Threats to database security
- SQL injection.
- Unauthorized access.
- Insider threats.
- Physical theft.
Threats to database security
Mitigation measures
- Encryption (data at rest/transit).
- Multi-factor authentication.
- Regular patching.
- Activity monitoring.
Data Migration
Steps in the Data Migration Process.
- Plan (scope, timeline).
- Assess data quality.
- Map fields (source → target).
- Select tools (ETL, replication).
- Test migration.
- Validate post-migration.
Data Migration
Risks in data migration
-Data loss/corruption.
- Downtime.
- Compatibility issues.
Backup & Recovery
Factors affecting RTO and RPO.
- Backup frequency.
- Backup type (full/incremental).
- Infrastructure speed.
- Data size.
Backup & Recovery
Types of recovery techniques
Mirroring (real-time copies).
- Log-based recovery (replay transactions).
- Checkpointing (snapshots).
Concurrency Control
Problems without concurrency control
- Lost updates.
- Dirty reads.
- Non-repeatable reads.
Concurrency Control
How does timestamp-based protocol work?
- Assign unique timestamps to transactions.
- Older transactions proceed first; conflicts trigger rollbacks.
Deadlocks
Conditions for deadlock
- Mutual exclusion.
- Hold and wait.
- No preemption.
- Circular wait.
Deadlocks
Deadlock handling strategies
- Prevention (break one condition).
- Avoidance (Banker’s algorithm).
- Detection and recovery (abort transactions).
Deadlock
Deadlock handling strategies
- Prevention (break one condition).
- Avoidance (Banker’s algorithm).
- Detection and recovery (abort transactions).