MySQL Articles

Page 4 of 355

RDBMS terminologies

Amit Diwan
Amit Diwan
Updated on 14-Mar-2026 12K+ Views

RDBMS (Relational Database Management System) uses specific terminologies to describe its components. These include Database, Table, Column, Row, and various types of keys. Let us see them one by one − Database A database is a collection of related tables. For example, a university database may contain tables like Student, Professors, Courses, etc. Table A table (also called a relation) is a collection of rows and columns that stores data about a specific entity. Here's an example of a Student table − ...

Read More

Sixth Normal Form (6NF)

Amit Diwan
Amit Diwan
Updated on 14-Mar-2026 6K+ Views

In Sixth Normal Form (6NF), a relation variable is decomposed into its irreducible components − each table contains at most the primary key and one non-key attribute. A relation is in 6NF only if it is already in 5NF and every join dependency on the relation is trivial. 6NF represents the highest level of normalization, where we eliminate all possible redundancy by separating each non-key attribute into its own table. This extreme decomposition ensures that no information loss occurs during normalization while maintaining data integrity through join operations. Understanding 6NF Decomposition ...

Read More

Unique Key in RDBMS

Alex Onsman
Alex Onsman
Updated on 14-Mar-2026 951 Views

A Unique Key is a constraint in RDBMS that ensures all values in a column (or set of columns) are distinct. Many users confuse Primary Key with Unique Key since both enforce uniqueness, but they differ in NULL handling, volume, and modifiability. The unique key constraint is essential for maintaining data integrity by preventing duplicate entries while providing more flexibility than primary keys. It's commonly used for columns like email addresses, phone numbers, or social security numbers where uniqueness is required but the field may not serve as the primary identifier. Primary Key vs Unique Key Feature ...

Read More

Foreign Key in RDBMS

Ricky Barnes
Ricky Barnes
Updated on 14-Mar-2026 3K+ Views

A Foreign Key is a column (or set of columns) in one table that creates a link to the primary key of another table. It establishes a relationship between two tables and enforces referential integrity − ensuring that values in the foreign key column always correspond to valid values in the referenced primary key. Example Consider two tables − Employee and Department. The DeptID in the Employee table is a foreign key that references the DeptID primary key in the Department table ? Employee EmpID (PK) EmpName EmpAge DeptID (FK) 1 ...

Read More

Alternate Key in RDBMS

Amit Diwan
Amit Diwan
Updated on 14-Mar-2026 5K+ Views

An Alternate Key (also called Secondary Key) is a candidate key that was not selected as the primary key. Every table may have multiple candidate keys that can uniquely identify each row, but only one is chosen as the primary key. The remaining candidate keys become alternate keys. Example 1: Student Table Consider the following Student table ? Student_ID Student_Enroll Student_Name Student_Email 096 2717 Manish aaa@gmail.com 055 2655 Manan abc@gmail.com 067 2699 Shreyas pqr@gmail.com Student_ID, Student_Enroll, and Student_Email are the candidate keys since each can uniquely ...

Read More

Candidate Key in RDBMS

Ricky Barnes
Ricky Barnes
Updated on 14-Mar-2026 2K+ Views

A Candidate Key is a minimal set of attributes that can uniquely identify each row in a table. Each table may have one or more candidate keys, and one of them is chosen as the Primary Key. A candidate key is essentially a minimal super key − no attribute can be removed from it without losing uniqueness. Example 1: Employee Table In an Employee table, both EmployeeID and EmployeeEmail can uniquely identify each employee. Therefore both are candidate keys. You select any one of them as the primary key, since a table can have only a single primary ...

Read More

Surrogate Key in RDBMS

Ricky Barnes
Ricky Barnes
Updated on 14-Mar-2026 1K+ Views

A Surrogate Key is a system-generated unique identifier in a database that has no actual business meaning. Its only purpose is to uniquely identify each row in a table. Common examples include auto-increment integers, GUIDs, and system-generated codes. Surrogate Key vs Natural Key Unlike a natural key (like Student_ID or Email) which has real-world meaning, a surrogate key is purely artificial − it exists only to serve as a unique identifier for data management and analysis purposes. Example In the following ProductPrice table, the Key column is a surrogate key − it has no business meaning ...

Read More

Super Key in RDBMS

Ricky Barnes
Ricky Barnes
Updated on 14-Mar-2026 3K+ Views

A Super Key is an attribute (or a set of attributes) that uniquely identifies a tuple (row) in a table. Any combination of columns that can uniquely identify each row is a super key. It is a superset of Candidate Key, since candidate keys are the minimal super keys with no redundant attributes. Example Consider the following Student table ? Student_ID Student_Enroll Student_Name Student_Email S02 4545 Dave ddd@gmail.com S34 4541 Jack jjj@gmail.com S22 4555 Mark mmm@gmail.com Super Keys The following are some of the super ...

Read More

Entity Integrity Rule in RDBMS

Alex Onsman
Alex Onsman
Updated on 14-Mar-2026 6K+ Views

The Entity Integrity Rule in RDBMS states that every table must have a primary key, and the primary key column(s) cannot contain NULL values. This ensures that every row in a table is uniquely identifiable. Example 1: Student Table Consider the following Student table ? Student_ID (PK) Student_Name Student_Awards S001 Alice Gold Medal S002 Bob NULL S003 Charlie Silver Medal Here Student_ID is the primary key. We cannot use Student_Awards as the primary key since not every student would have received an award (it can be ...

Read More

Composite Key in RDBMS

Amit Diwan
Amit Diwan
Updated on 14-Mar-2026 5K+ Views

A composite key is a primary key that consists of two or more columns combined to uniquely identify each row in a table. A single column alone may not be unique, but the combination of multiple columns together forms a unique identifier. Example 1: Order Details In an order details table, a single OrderID can appear in multiple rows (for different products), and a single ProductID can appear in multiple orders. However, the combination of OrderID + ProductID is unique for each row ? OrderDetails ...

Read More
Showing 31–40 of 3,547 articles
« Prev 1 2 3 4 5 6 355 Next »
Advertisements