Sonzaschool
Back

O-Level · Secondary 4

ICT

Database Relationships and Normalization

about 12 minutes to read

Discussions
Topics in this sectionDatabase Queries and Relationships2 topics
  1. Creating Queries
  2. Database Relationships and Normalization

A database is not just a collection of separate tables sitting on their own. In the real world, data is connected. For example, when a customer places an order, the database must know which customer placed which order, what products were ordered, and how much was paid. All this information lives in different tables, but they must communicate with each other. This communication between tables is what we call a relationship, and setting these relationships up correctly is one of the most important skills in database design.

When tables are properly related, you can pull information from multiple tables at once using queries. This is what makes a database powerful — instead of writing the same customer's name in every single order record, you simply refer to the customer's ID, and the database looks up the rest of the information when needed.

Question

What is the main purpose of a primary key in a database table?

Sign in to submit your answer and have it count toward your mastery.

Sign in to practice

Tutor

Stuck? Ask me anything about this topic.

Sign in to ask the Sonza AI Tutor about this question.

Sign in to ask

Discussions

No questions yet

Sign in to ask
Loading discussions…