


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



SQL Data Definition G52DBS – Database Systems www.cs.nott.ac.uk/~smx/DBS
SQL Data Definition G52DBS – Database Systems www.cs.nott.ac.uk/~smx/DBS
SQL Data Definition G52DBS – Database Systems www.cs.nott.ac.uk/~smx/DBS
SQL Data Definition G52DBS – Database Systems www.cs.nott.ac.uk/~smx/DBS
SQL Data Definition G52DBS – Database Systems www.cs.nott.ac.uk/~smx/DBS
Set C to be the first Course Record /* Find course code for / Code = ‘’ / ‘Database Systems’ / While (C is not null) and (Code = ‘’) If (C.Title = ‘Database Systems’) Then Code = C.Code Set C to be the next Course Record Set NAMES to be empty / A list of student names / Set S to be the first Student Record While S is not null / For each student... / Set E to be the first Enrolment Record While E is not null / For each enrolment... / If (E.ID = S.ID) And / If this student is / (E.Code = Code) Then / enrolled in DB Systems / NAMES = NAMES + S.NAME / add them to the list */ Set E to be the next Enrolment Record Set S to be the next Student Record Return NAMES
SQL Data Definition G52DBS – Database Systems www.cs.nott.ac.uk/~smx/DBS
SQL Data Definition G52DBS – Database Systems www.cs.nott.ac.uk/~smx/DBS
SQL Data Definition G52DBS – Database Systems www.cs.nott.ac.uk/~smx/DBS
SQL Data Definition G52DBS – Database Systems www.cs.nott.ac.uk/~smx/DBS
Enrolment
Student
Module
In
Has
ID
Code
Title
Name
Address
Year
Exam Assignment
Assignment
Exam
Credits SQL Data Definition G52DBS – Database Systems www.cs.nott.ac.uk/~smx/DBS
Student
ID
Name
Address
Year
SQL Data Definition G52DBS – Database Systems www.cs.nott.ac.uk/~smx/DBS
<col-def-1>, <col-def-2>, : <col-def-n>, <constraint-1>, : <constraint-k>)
SQL Data Definition G52DBS – Database Systems www.cs.nott.ac.uk/~smx/DBS
SQL Data Definition G52DBS – Database Systems www.cs.nott.ac.uk/~smx/DBS
Enrolment
Student
Module
In
Has
ID
Code
Title
Name
Address
Year
Exam Assignment
Assignment
Exam
Credits SQL Data Definition G52DBS – Database Systems www.cs.nott.ac.uk/~smx/DBS
Enrolment
Student
Module
In
Has
ID
Code
Title
Name
Address
Year
Exam Assignment
Assignment
Exam
Credits
SQL Data Definition G52DBS – Database Systems www.cs.nott.ac.uk/~smx/DBS
CONSTRAINT