A-Level Computer Science / Unit 8: Relational Databases and SQL

8.1.9 Data Modelling and Logical Schemas

πŸ”’ Lesson slides are available to signed-in users. Sign in

8.1.9 Data Modelling and Logical Schemas

Data modelling is the activity of designing a representation of stored information. A logical schema is the structured description of tables, fields, keys and relationships that results.

By the end of this page, you should be able to:

  • define and use the key terms accurately;
  • explain how the idea works using a new example;
  • apply the idea to a database design or SQL task.

1. Modelling is a process

Start from what a system needs to remember and retrieve. Identify entities, attributes, relationships and rules. For a wildlife rescue service, the entities might include Animal, CareVisit and Volunteer.

2. A logical schema records the design

A logical schema describes the intended database structure: tables, their fields, primary and foreign keys, and relationships. It is independent of a particular DBMS product. It gives a clear plan that can later be implemented.

3. The design stages connect

An E–R model helps represent the entities and relationships. The designer maps the model to tables, chooses keys and data types, and documents those decisions in the logical schema. DDL can then create the structures in a DBMS.

4. Keep schema and stored data separate

A schema is the description of how data is organised; the actual records are the data. A data dictionary can hold metadata about the schema, such as field types and constraints. It is not simply another name for the ordinary records.

Worked example

A schema entry might state: Animal(AnimalID INTEGER primary key, Name VARCHAR(40), RescueDate DATE). CareVisit stores AnimalID as a foreign key. The schema describes the structure; actual Animal rows contain the registered animals.

Common mistake to avoid

Data modelling and logical schema are related but not identical: modelling is the design work; the logical schema is the resulting structural description.

Interactive check

Choose an answer, read the explanation, and continue to the next example.

Try it

Check your understanding

Question 1 of 3
Score: 0 / 3

Independent practice

Try this original question before opening the suggested response.

A community garden needs to record plots and gardeners. Explain what data modelling does and name two details that should appear in its logical schema. (3)

Suggested response

Data modelling identifies and organises the information the system needs, including entities and their relationships. The logical schema should list tables and fields, and can specify primary keys, foreign keys, data types or constraints.

Answering clearly

Use the technical term, state what it does, and connect your explanation to the details in the question.