Menu
Courses / sql-basic / Database Structure

Database Structure

03 / 14 Part of sql-basic






SQL Topic 3 - Database Structure





SQL Basics Course


Topic 3: Database Structure


Learn how data is organized inside relational databases using tables, rows, columns, records, fields, and schemas.







Learning Objectives



  • Understand database structure

  • Learn tables, rows and columns

  • Understand records and fields

  • Learn database schemas

  • Visualize how information is stored





What is a Table?


A table is the primary storage structure in a relational database. It stores related information in rows and columns.



















IDNameCity
1RahulDelhi
2AmitMumbai




What is a Row?


A row represents one complete record inside a table.




Row Example → (1, Rahul, Delhi)


Every row contains information about one entity.





What is a Column?


A column represents a specific attribute of the data.




















Column NameDescription
IDStudent Identifier
NameStudent Name
CityStudent City




What is a Field?


A field is a single value stored at the intersection of a row and a column.




Name Column + Rahul Row = Field Value "Rahul"




What is a Record?


A record is a complete collection of fields describing one item.














IDNameCity
1RahulDelhi


The entire row above is a record.





Understanding Schema


A schema is the blueprint of a database. It defines tables, columns, relationships and constraints.




Database Schema



Students Table


ID | Name | City




How Data is Organized




Database



Tables



Rows & Columns



Fields & Records





Real World Example






















Employee IDNameDepartmentSalary
101JohnIT50000
102SarahHR45000


This single table contains multiple records, columns, and fields.





Best Practices



  • Use meaningful table names

  • Use clear column names

  • Avoid duplicate data

  • Keep schema organized

  • Plan relationships early





Practice Exercises



  1. Define a table.

  2. What is the difference between a row and a column?

  3. What is a field?

  4. What is a record?

  5. Explain schema in your own words.





Quiz


1. What stores related data in a database?


2. What is a complete row called?


3. What is a single cell value called?


4. What is the blueprint of a database?


5. Are columns attributes or records?





Summary



  • Tables store related information.

  • Rows represent records.

  • Columns represent attributes.

  • Fields contain individual values.

  • Schemas define database structure.