DBMS
DBMS
1. What is DBMS?
A DBMS (Database Management System) is software that enables the creation,
management, and manipulation of databases.
2. What is RDBMS?
RDBMS (Relational Database Management System) is a type of DBMS that organizes data
into structured tables with relationships.
5. What is normalization?
Normalization is the process of organizing data to reduce redundancy and improve data
integrity.
7. What is a transaction?
A transaction is a sequence of operations performed as a single logical unit of work that
must be completed successfully or not at all.
8. What is ACID?
ACID (Atomicity, Consistency, Isolation, Durability) is a set of properties that ensure reliable
transaction processing in a database.
9. What is SQL?
SQL (Structured Query Language) is a standard programming language used to manage
and manipulate relational databases.
10. What is a join?
A join is an SQL operation that combines rows from two or more tables based on a related
column.
DEFINITION
1. Open Source: Software with accessible source code for anyone to modify and distribute,
promoting collaboration and transparency.
2. NOT NULL: A database constraint that ensures a column must always have a value and
cannot contain NULL.
3. Primary Key: A column (or set of columns) that uniquely identifies each record in a table
and cannot be NULL.
4. Foreign Key: A column in one table that references the primary key of another table,
establishing a relationship between them.
5. Unique Key: A constraint ensuring all values in a column are unique, allowing NULL
values (depending on the database).
7. COMMIT: A command that saves all changes made during the current transaction
permanently.
8. ROLLBACK: A command that undoes all changes made during the current transaction.
10. DDL (Data Definition Language): SQL commands used to define and modify database
structures.
11. DML (Data Manipulation Language): SQL commands used to manipulate data within
tables.
12. DCL (Data Control Language): Commands used to control user access and permissions
in a database.
14. DQL (Data Query Language): SQL commands used to query and retrieve data from a
database.
15. DBMS (Database Management System): Software that enables the creation,
management, and manipulation of databases.
16. RDBMS (Relational Database Management System): A type of DBMS that stores data in
structured tables and maintains relationships between them.
17. INNER JOIN: Returns only the rows with matches in both tables.
18. LEFT JOIN: Returns all rows from the left table and matched rows from the right table.
19. RIGHT JOIN: Returns all rows from the right table and matched rows from the left table.
20. FULL JOIN: Returns rows when there is a match in either table.
21. CROSS JOIN: Returns the Cartesian product of two tables, combining every row from
both.
22. SELF JOIN: Joins a table to itself to compare rows within the same table.
23. Procedural Language: Allows writing a sequence of instructions with control structures
for data operations.
25. SQL: Structured Query Language used for managing and manipulating relational
databases.
27. Clause: Components of a SQL statement that specify conditions or criteria for querying
or manipulating data.
28. Cursor: A database object that allows row-by-row processing of query results, enabling
detailed manipulation.
Syntax
1. CREATE TABLE
2. INSERT INTO
3. SELECT
4. UPDATE
5. DELETE
6. ALTER TABLE
7. DROP TABLE
8. CREATE INDEX
Creates an index to improve query performance.
9. COMMIT
COMMIT;
10. ROLLBACK
ROLLBACK;
Example
1. SELECT:
2. INSERT:
3. UPDATE:
4. DELETE:
5. CREATE TABLE:
6. ALTER TABLE:
7. DROP TABLE:
8. CREATE INDEX:
9. JOIN:
10. GRANT:
Codd's 12 rules (proposed by Edgar F. Codd) define the basic criteria that a system must
meet to be considered a true relational database management system (RDBMS). Here’s a
summary of the rules:
1. Information Rule: All data is stored in tables (relations) as values within rows and
columns.
2. Guaranteed Access Rule: Every piece of data is accessible through a combination of table
name, primary key, and column name.
4. Dynamic Online Catalog: The metadata (data about the database structure) must be
stored as a table and accessible via SQL.
6. View Updating Rule: Views (virtual tables) should be updatable like base tables.
7. High-Level Insert, Update, and Delete: The system must support operations on sets of
rows (not just single rows).
8. Physical Data Independence: Changes in physical storage should not affect how data is
accessed.
9. Logical Data Independence: Changes in table structures should not affect how data is
accessed.
11. Distribution Independence: The user should not be aware of whether the database is
distributed across multiple locations.
12. Non-Subversion Rule: No low-level access (e.g., bypassing the RDBMS rules) should
subvert the integrity of the database.