What is Relational Database Management System (RDBMS)?
A Relational Database Management System (RDBMS) is software that manages data stored in tables. These tables organize information into rows and columns, making it easy to find and work with specific data points. Popular RDBMS examples include MySQL, Microsoft SQL Server, Oracle, and IBM Db2.
What is a Table?
In an RDBMS, data is stored in tables, which are collections of related information organized into rows and columns. Each row signifies a single record, and each column shows a specific attribute of that record.
Example:
Consider a table named Students
that stores information about students:
StudentID | FirstName | LastName | Age | Major |
---|---|---|---|---|
1 | Alice | Johnson | 20 | Computer Science |
2 | Bob | Smith | 22 | Mathematics |
3 | Carol | Lee | 19 | Physics |
- Rows: Each row holds data about a specific student. The first row shows a student named Alice Johnson. She is 20 years old and majors in Computer Science.
- Columns: Each column shows a specific attribute of the students, like
StudentID
,FirstName
,LastName
,Age
, andMajor
.
This tabular structure allows for efficient organization and retrieval of data within the database.
What is a Field?
A field is like a column in a table. It holds specific information about all the records in the table. Each field is focused on one type of data.
Example:
In a CUSTOMERS
table, fields could include:
ID
: A unique number for each customer.Name
: The name of the customer.Age
: The customer’s age.Salary
: How much the customer earns.City
: The city they live in.Country
: The country they are from.
What is a Record or a Row?
A record is also called a row. It represents one complete entry in a table. Each record contains values for all the fields in the table.
Example:
In the CUSTOMERS
table, a record might look like this:
ID | Name | Age | Salary | City | Country |
---|---|---|---|---|---|
1 | Alice | 30 | 50000 | New York | USA |
This row contains all the information about one customer, Alice.
What is a Column?
A column is a vertical collection of data in a table. It shows information for one specific field across all records.
Example:
In the CUSTOMERS
table, the Name
column includes:
- Alice
- Bob
- Charlie
Every record has a value in the Name
column.
What is a NULL Value?
A NULL value means a field is empty. It has no data. This is different from a field with a value of 0 or a space. A NULL value means no information was entered for that field.
Example:
Here’s a table with NULL and other values:
ID | Name | Salary |
---|---|---|
1 | Alice | NULL |
2 | Bob | 0 |
3 | Charlie | 40000 |
- In the first row, Alice’s
Salary
field is NULL because no value was provided. - In the second row, Bob’s
Salary
is 0, meaning he earns nothing, but the field is not NULL. - In the third row, Charlie’s
Salary
is 40000, a valid value.