DDL Student Records

From SQLZOO
Revision as of 08:41, 20 October 2016 by Andr3w (talk | contribs) (Created page with "Creating a database: Student record database. In this tutorial you will learn how to create tables and set up links between tables. ==Student Records, Logical Design== The d...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Creating a database: Student record database.

In this tutorial you will learn how to create tables and set up links between tables.

Student Records, Logical Design

The database is intended to record the grades of students studying modules at a University.

There are a number of students, identified by a matric number. There are a number of modules, identified by a module code. Each student studies many modules and will get a result for each. Each module is studied by many students.

File:SITS ERD.jpg

The plan

We will create three tables, one for each of the entities in the diagram shown above. Where there is a "parent/child" relation (a one to many) we must create the ONE before we create the MANY. That means we should create the table in the order [student, module, registration] (or [module, student, registration]) but not [registration, module, student].