Specify an appropriate set of classes for the Student Registration System. Do this using ?rst UDTs of SQL:2003 and then the ODL language of ODMG.

What will be an ideal response?

We modify the tables de?ned in Section 4.8 in two ways: Using references to types instead of foreign key constraints and by making use of set-valued attributes.


CREATE TYPE Course AS (
CrsCode CHAR(6),
DeptId CHAR(4) NOT NULL,
CrsName CHAR(20) NOT NULL,
creditHours INTEGER NOT NULL,
SemestersOffered CHAR(6) MULTISET,
Requires REF(Course) MULTISET,
PRIMARY KEY (CrsCode)
)

CREATE TYPE Class UNDER Course AS (
CrsCode CHAR(6),
SectionNo INTEGER,
Semester CHAR(6),
Year INTEGER,
ClassTime CHAR(6),
Enrollment INTEGER,
MaxEnrollment INTEGER,
Textbook CHAR(50),
TaughtIn REF(Room),
Instructor REF(Facu lty ),
PRIMARY KEY (CrsCode, SectionNo, Semester, Year)
)

CREATE TYPE Room AS (
ClassroomId INTEGER,
Seats INTEGER,
PRIMARY KEY(ClassroomId)
)

CREATE TYPE Student AS (
Id CHAR(9),
Address CHAR(50),
Name CHAR(20),
Password CHAR(10),
Transcript REF(TranscriptRecord) MULTISET,
PRIMARY KEY(Id)
)

CREATE TYPE TranscriptRecord AS (
Grade CHAR(1),
Class REF(Class)
)

CREATE TYPE Facu lty AS (
Id CHAR(9),
Name CHAR(20),
Address CHAR(50),
DeptId CHAR(4),
Password CHAR(10),
PRIMARY KEY(Id)
)


The ODMG version of the Student Registration Schema is as follows:

class Course
(extent CourseExt
keys CrsCode)
{
attribute String CrsCode;
attribute String DeptId;
attribute String CrsName;
attribute Integer creditHours;
attribute Set SemestersOffered;
relationship Set Requires;
}
class Class extends Course
(extent ClassExt
keys (CrsCode, SectionNo, Semester, Year))
{
attribute String CrsCode;
attribute Integer SectionNo;
attribute String Semester;
attribute Integer Year;
attribute String ClassTime;
attribute Integer Enrollment;
attribute Integer MaxEnrollment;
attribute String Textbook;
relationship Room TaughtIn;
relationship Facu lty Instructor;
}

class Room
(extent RoomExt
keys ClassroomId)
{
attribute Integer ClassroomId;
attribute Integer Seats;
}
class Student
(extent StudentExt
keys Id)
{
attribute String Id;
attribute String Address;
attribute String Name;
attribute String Password;
relationship Set Transcript;
}

class TranscriptRecord
(extent TranscriptRecordExt)
{
attribute String Grade;
relationship Class Class;
}

class Faculty
(extent ProfessorExt
keys Id)
{
attribute String Id;
attribute String Name;
attribute String Address;
attribute String DeptId;
attribute String Password;
}

Computer Science & Information Technology

You might also like to view...

Which of the following describes the expected properties of an asynchronous digital subscriber line service?

A. The data upload speed is faster than the data download speed. B. The data download speed is faster than the data upload speed. C. The data upload speed is the same as the data download speed. D. The data throughput speed direction can be selected based on the user’s discretion.

Computer Science & Information Technology

Issued as RFC 2104, __________ has been chosen as the mandatory-to-implement MAC for IP Security.

A. RSA B. SHA-3 C. DSS D. HMAC

Computer Science & Information Technology