Sonzaschool
Back

O-Level · Form 2 · Vocational · Electronics and Computer

Computer Programming

Designing relations

about 4 minutes to read

Discussions
Topics in this sectionImplementing database modelling and relationships3 topics

Designing Relations in Databases

A relation in a database is a way of organizing data into tables where each table represents a real-world entity (like a person, product, or transaction). Relations show how data in one table connects to data in another table. When we design relations properly, we avoid problems like duplicated data and make it easy to find and update information.

In database design, we use three main types of relationships between tables:

One-to-One (1:1) Relationship

One record in the first table relates to only one record in the second table, and vice versa. For example, each student in a school has one unique identification number, and each ID number belongs to one student.

One-to-Many (1:N) Relationship

One record in the first table can relate to many records in the second table, but each record in the second table relates to only one record in the first table. For example, one teacher can teach many students, but each student has one main teacher.

Many-to-Many (M:N) Relationship

Records in both tables can relate to many records in the other table. For example, a student can take many subjects, and each subject can be taken by many students. This relationship usually requires a third connecting table.

How you'll be assessedProcess assessment · Outcome assessment · Knowledge assessment

Process assessment

  • Identify entities
  • Identify attributes and keys.
  • Apply normalization rules to organize data into relations.
  • Create relational tables.

Outcome assessment

Database relations are correctly designed.

Knowledge assessment

Detailed knowledge of:

Method used: The student should explain how to:

  • process of designing relations.

Principles: The student should explain the principle of:

  • Normalization and data redundancy

Theories: The student should explain:

  • The concepts of entities, attributes, relationships
  • Types of relationships (1:1, 1:M, M:N).

Circumstantial knowledge:

Detailed knowledge about:

  • Data integrity and dependencies.

Question

Which statement correctly describes 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…