DB Flashcards
Types of DBMS Models
Hierarchical DB
Network
ER Model
Relational DB
DB Model
A database model is a type of data model that determines the logical structure of a database. It fundamentally determines in which manner data can be stored, organized and manipulated.
Drop vs Truncate syntax
Syntax» Drop: delete an entire table or db
Truncate: Delete specific data within the db
Database Transaction
A Database Transaction is a logical unit of processing in a DBMS which entails one or more database access operation. a database transaction is a single unit of all the dynamics involved in one or more database operationsIn a nutshell, database transactions represent real- world events of any enterprise.
ACID Properties of a DB
Atomicity
Consistency
Isolation
Durability
Define ACID properties of a DB
ACID Properties are used for maintaining the integrity of database during transaction processing. ACID in DBMS stands for Atomicity, Consistency, Isolation, and Durability.
External Model of a DB
The external model is the end user’s view of the data. Typically a database is an enterprise system that serves the needs of multiple departments. However, one department is not interested in seeing other departments’ data (e.g., the human resources (HR) department does not care to view the sales department’s data).
Conceptual design
Conceptual design is the first stage in the database design process. The goal at this stage is to
design a database that is independent of database software and physical details. The output of this process is a conceptual data model that describes the main data entities, attributes, relationships, and constraints of a given problem domain.
Keep in mind the following minimal data rule:
“All that is needed is there, and all that is there is needed”.
Schema
schema is the skeleton structure that represents the logical view of the entire database. The blueprint for how data is organized and stored within the database, specifying the tables, fields, data types, constraints, and relationships between tables.
reasons for database abstraction level
- Data Independence
- Application Portability
- Security
- Access Control
- Query Optimization
- High Availability
- Scalability
- Cross-Platform Compatibility
Importance of DB Transaction Log
Security
High Availability
Archive
PIT recovery
Rollback support
SQL Statements used in DB
Commit
Rollback
Levels of transaction isolation
Non committed reads
Committed reads
Repeatable reads
Serialized
Main components of a db
Software
Hardware
Data
Procedures
Data access language