Essential Database Management System Concepts Explained
Classified in Computers
Written on in
with a size of 3.28 KB
Core Goals of a DBMS
A robust database management system (DBMS) provides software tools for the efficient storage, retrieval, manipulation, security, and administration of data. Key objectives include:
- Ensuring data integrity and security
- Supporting concurrent access
- Providing data abstraction
- Optimizing query processing
Entity Relationships and Cardinality
Strong vs. Weak Entities
An entity denotes a distinct object, while an entity type defines its category and an entity set aggregates objects belonging to that category. A strong entity has its own primary key, whereas a weak entity lacks its own and depends on a foreign key from a strong entity (e.g., order items for an order).
Cardinality
Cardinality represents the uniqueness and number of elements in a set, defining relationships and constraints between database tables.
Data Structures and Constraints
Tuples and Domains
A tuple is a series of ordered values representing a single record in a relational table. A domain is the complete set of valid values an attribute can assume within a relational database environment.
Integrity Constraints
Integrity constraints are rules ensuring the accuracy, consistency, and validity of data in the database.
Keys and Normalization
Super, Candidate, and Primary Keys
- Super Key: An attribute or set of attributes that uniquely identifies rows.
- Candidate Key: A minimal super key.
- Primary Key: The chosen candidate key for unique identification.
- Foreign Key: Used to reliably link tables.
Normalization
Normalization is the systematic process of organizing database tables to minimize redundancy and dependency while enhancing data integrity. Regarding 3NF vs. BCNF: while 3NF allows non-key attributes with transitive dependencies, BCNF requires that every determinant is a candidate key.
Database Operations and Logic
Querying and Logic
Domain Relational Calculus is a declarative method for querying databases using logical formulas to express conditions on attributes. The SELECT operation retrieves data from tables, while the UNION operation combines result sets and removes duplicate entries.
DDL and DML Commands
- DDL (Data Definition Language): Defines schema using
CREATE,ALTER, andDROP. - DML (Data Manipulation Language): Manipulates data using
INSERT,UPDATE,DELETE, andSELECT.
Triggers and Redundancy
A trigger is a stored procedure automatically executed in response to database operations such as INSERT, UPDATE, or DELETE. Redundancy refers to the unnecessary duplication of data within a database, which can lead to inconsistencies and inefficient storage practices.