Definition of Relational Database:
A relational database is a type of database that stores and organizes data in tables (also called relations) consisting of rows and columns. It establishes relationships between different tables using common fields.
The concept of relational database was introduced by E. F. Codd in 1970.
Key Characteristics:
Advantages of Relational Databases:
Example: School Management System
Table 1: Students
| StudentID (Primary Key) | Name | Age | Grade |
|---|---|---|---|
| 101 | Alice Johnson | 15 | 10 |
| 102 | Bob Smith | 16 | 11 |
| 103 | Charlie Brown | 15 | 10 |
| 104 | Diana Prince | 17 | 12 |
Table 2: Courses
| CourseID (Primary Key) | CourseName | Credits |
|---|---|---|
| CS101 | Computer Science | 3 |
| MATH201 | Mathematics | 4 |
| ENG102 | English Literature | 2 |
| SCI103 | Science | 3 |
Table 3: Enrollments (Relationship Table)
| EnrollmentID | StudentID (Foreign Key) | CourseID (Foreign Key) |
|---|---|---|
| 1 | 101 | CS101 |
| 2 | 101 | MATH201 |
| 3 | 102 | ENG102 |
| 4 | 103 | CS101 |
| 5 | 104 | SCI103 |
| 6 | 104 | MATH201 |
How It Works:
This structure allows queries such as:
Common Relational Database Management Systems (RDBMS):
Final Answer:
A relational database organizes data into tables with rows and columns and establishes relationships between them using keys. Example: Students, Courses, and Enrollments tables in a school database.