diff --git a/STINK_student_records.xml b/STINK_student_records.xml index 946dcf0..5d99cbc 100644 --- a/STINK_student_records.xml +++ b/STINK_student_records.xml @@ -6,18 +6,18 @@
The Southern Technical Institute for Natural Knowledge is a medium-sized tertiary education provider (founded in 1982) that teaches papers across many subjects, which lead to several different qualifications. They are currently in the process of designing and implementing a new student records database. The requirements analysis and conceptual design phases of the project are complete, and you have been brought in as lead database developer. It will be your task to implement an initial prototype of the conceptual specification. A design-level entity-relationship diagram of the proposed database is shown in
indicates the unique identifier, *
indicates that a value is required, and o
indicates that a value is not required.
The Southern Technical Institute for Natural Knowledge is a medium-sized tertiary education provider (founded in 1982) that teaches papers across many subjects, which lead to several different qualifications. They are currently in the process of designing and implementing a new student records database. The requirements analysis phase of the project is complete, and you have been brought in as a lead database developer. It will be your task to implement an initial prototype of the specification resulting from the requirements analysis phase. An ERD of the proposed database is shown in
BCom,
PGDipCApSc(these are not the only possible values).
Degree,
Diplomaor
Certificate.
Qualification
If we wanted to allow for additional qualification types in future, we could create a separate Qualification_Type
lookup table, with a single column Type
. We could then replace the CHECK
constraint Qualification_Type_Valid
with a foreign key to the lookup table.
If we wanted to allow for additional qualification types in future, we could create a separate Qualification_Type
lookup table, with a single column Type
. We could then replace the CHECK
constraint Qualification_Type_Valid
with a foreign key to the lookup table. If we use the existing values, this can even be done without breaking the specification.
Points
The period of a paper must be one of the following: SS
(Summer School), S1
(Semester One), S2
(Semester Two) or FY
(Full Year).
Paper
We also need to add an associative entity between Paper and Qualification in order to resolve the many-to-many relationship:
- -Schedule
The Schedule entity exists only to associate Qualification with Paper and thus has no additional attributes beyond its primary key attributes.
+ +Person_ID
Email
Username
Email
Staff_ID
Salary
Email
Student_ID
Person_ID
attribute, but bonus marks will be awarded if you are able to do so. (This also applies to the Enrolment_ID
and Assessment_ID
attributes below.)AL(Assistant Lecturer),
L(Lecturer),
SL(Senior Lecturer),
AP(Associate Professor) or
P(Professor).
Person
Staff
Staff
This solution uses the discrete approach for transforming subtypes. The additive approach is also feasible (i.e., place the Person attributes into both Staff and Student, and eliminate Person entirely). We accepted either approach, but note that the discrete approach has one distinct advantage over the additive approach in this scenario. Consider what happens when someone is both a staff member and a student: we end up duplicating all the person
data across both tables. This doesn
It’s important when implementing “boolean” style columns such as International
in Student
and Release
in Assessment
that you are consistent in the values that you use across all such columns (more precisely, all such columns should have the same domain). Quite a few people did something like implement one column as 'T', 'F'
and the other as 'True', 'False'
, or even more subtle, 't', 'f'
(remembering that SQL is case sensitive). Using inconsistent domains for columns that should have the same domain could lead to subtle bugs later on.
For those who implemented the additive approach, we marked the person
attributes in Staff and Student as if they were a separate Person entity.
The integrated approach was definitely not suitable due to the supervision relationship between Staff and Student (which, incidentally, many people missed completely), and the mandatory attributes that exist in both Staff and Student.
- -We also need to add an associative entity between Paper and Staff in order to resolve the many-to-many relationship:
- -Teach
Itboolean
style columns such as International
in Student
and Visible
in Assessment
that you are consistent in the values that you use across all such columns (more precisely, all such columns should have the same domain). Quite a few people did something like implement one column as 'T', 'F'
and the other as 'True', 'False'
, or even more subtle, 't', 'f'
(remembering that SQL is case sensitive). Using inconsistent domains for columns that should have the same domain could lead to subtle bugs later on.
This of course is really a consequence of not having a proper BOOLEAN
data type in SQL. However, one person did discoverBOOLEAN
data type in CREATE TABLE
! This certainly wasnBOOLEAN
was available in PL/SQL only.
This of course is really a consequence of not having a proper BOOLEAN
data type in SQL. However, one person did discover—possibly inadvertently, given that it isn’t mentioned anywhere in the documentation—that BOOLEAN
data type in CREATE TABLE
! This certainly wasn’t possible in older versions, where BOOLEAN
was available in PL/SQL only.
Staff_ID
Paper_Code
Year_Taught
Role
The year of enrolment cannot be earlier than the year in which the Institute was founded. (Technically it should also not be in the future, but we cannot check this in
Enrolment(
A surprising number of people appear to have missed the statement of when the Institute was founded in the first paragraph of the specification!
-Another very common error was to set the size of the Comments
column to a relatively small number, like 200. Think about how much you can say in that many characters (one and a bit text messages), then consider what kinds of things you might want to enter into a general comments column. We deducted marks for anything smaller than 500 characters. When you have no idea of how much you
Another very common error was to set the size of the Comments
column to a relatively small number, like 200. Think about how much you can say in that many characters (one and a bit text messages), then consider what kinds of things you might want to enter into a general comments column. We deducted marks for anything smaller than 500 characters. When you have no idea of how much you’re going to get, it’s much better to go large than to go small!
Visible
Release
Weight
A(assignment),
T(test) or
X(exam).
Maximum_Mark
attribute stores the maximum possible raw mark for the assessment (e.g., 30), while the Weight
attribute stores the percentage weight of this assessment for the paper as a whole (e.g., 10Maximum_Mark
is not specified, then applications should use Weight
for both.Visible
attribute controls whether or not the marks for this assessment are publicly accessible.Release
attribute controls whether or not the marks for this assessment are publicly accessible.Assessment(
Percentage_Mark
Raw_Mark
attribute stores the raw mark awarded for an assessment. Its value should be between zero and the value of Assessment.Maximum_Mark
(note that only the former is required for this assignmentRaw_Mark
attribute stores the raw mark awarded for an assessment. Its value should be between zero and the value of Assessment.Maximum_Mark
(note that only the former is required for this assignment—bonus marks if you can also achieve the latter).Weighted_Mark
attribute is calculated by the formula: Raw_Mark
/ Assessment.Maximum_Mark
Assessment.Weight
.Result(