MySQL Interview – Definitions Notes
Concise, interview-ready definitions for quick revision.
Key Definitions
Database: An organized collection of structured data stored electronically.
DBMS: Software that manages databases by storing, retrieving, and manipulating data.
RDBMS: A DBMS that stores data in tables with rows and columns and uses relationships.
SQL: A standard language used to interact with relational databases.
Table: A collection of related data organized into rows and columns.
Row: A single record in a table.
Column: An attribute or field in a table.
Primary Key: A column that uniquely identifies each record and cannot be NULL.
Foreign Key: A column that references the primary key of another table.
Candidate Key: A column that can uniquely identify a record.
Alternate Key: A candidate key not chosen as the primary key.
Composite Key: A primary key made up of multiple columns.
Unique Key: Ensures all values in a column are unique and allows NULL.
NOT NULL: Prevents NULL values in a column.
DEFAULT: Assigns a default value to a column.
DDL: Commands that define or modify database structure.
DML: Commands that manipulate data in tables.
DQL: Commands used to retrieve data.
DCL: Commands that control access to data.
TCL: Commands that manage transactions.
CHAR: A fixed-length character data type.
VARCHAR: A variable-length character data type.
INT: Stores whole numbers.
DECIMAL: Stores exact numeric values.
DATE: Stores date values.
DATETIME: Stores date and time values.
WHERE: Filters rows based on conditions.
ORDER BY: Sorts query results.
LIMIT: Restricts the number of rows returned.
Aggregate Function: Performs a calculation on multiple rows and returns one value.
GROUP BY: Groups rows with the same values.
HAVING: Filters grouped data.
JOIN: Combines rows from two or more tables.
INNER JOIN: Returns matching records from both tables.
LEFT JOIN: Returns all records from the left table and matching records from the right.
RIGHT JOIN: Returns all records from the right table and matching records from the left.
Subquery: A query written inside another query.
View: A virtual table created from a SELECT query.
Index: A database object that improves query performance.
Transaction: A set of SQL operations executed as a single unit.
ACID: Atomicity, Consistency, Isolation, and Durability.
Stored Procedure: A precompiled collection of SQL statements stored in the database and
executed by calling its name.
Function: A database object that returns a single value.
Trigger: An automatic action executed in response to table events.
Normalization: The process of organizing data to reduce redundancy.
1NF: Ensures atomic values and no repeating groups.
2NF: Ensures no partial dependency.
3NF: Ensures no transitive dependency.
DELETE: Removes specific rows and can be rolled back.
TRUNCATE: Removes all rows and cannot be rolled back.
DROP: Deletes the entire table or database permanently.