Database architecture refers to the design of the database system, how data is stored, how relationships are defined, and how data is accessed.

Tables, Rows, and Columns
1. Tables
  • A table is a collection of data organized into rows and columns.
  • Each table represents an entity, such as employees, orders, or products.
  • Tables are defined by a schema that specifies their columns (attributes) and the data types of those columns.

Example: A table called employees might have columns such as employee_id, first_name, last_name, hire_date, salary.

2. Rows (Records)
  • A row in a table represents a single record or instance of the entity.
  • For example, in the employees table, each row would represent an individual employee, with specific values for each column.

Example:

 

employee_idfirst_namelast_namehire_datesalary
1JohnDoe2020-01-0150000
2JaneSmith2019-02-0155000
3. Columns (Attributes)
  • Columns define the types of data that each record can store, such as name, address, phone_number, etc.
  • Each column has a name and a data type (e.g., VARCHAR for text, INT for integers, DATE for dates).

Example (for employees table):

  • employee_id (INT)
  • first_name (VARCHAR)
  • last_name (VARCHAR)
  • hire_date (DATE)
  • salary (DECIMAL)