E-R diagrams can be used for designing class de?nitions for object databases. Design ODMG class de?nitions for the E-R diagrams in Figure 4.1, Figure 4.6, and Figure 4.36.

What will be an ideal response?



// For Figure 4.1
class Person : Object
(extent PersonExt
keys SSN)
{
attribute Integer SSN;
attribute String Name;
attribute String Address;
attribute Set Hobbies
}

// For Figure 4.6
class Person : Object
(extent PersonExt
keys SSN)
{
attribute Integer SSN;
attribute String Name;
attribute Date DOB;
}
class Employee extends Person
(extent EmployeeExt)
{
attribute String Department;
attribute Float Salary;
}
class Student extends Person
(extent StudentExt)
{
attribute Date StartDate;
attribute Float GPA;
}
class Secretary extends Employee
(extent SecretaryExt)
{
}
class Technician extends Employee
(extent TechnicianExt)
{
attribute String Specialization;
}
class Freshman extends Student
(extent FreshmanExt)
{
}
class Sophomore extends Student
(extent SophomoreExt)
{
attribute String Major;
}
class Junior extends Student
(extent JuniorExt)
{
attribute String Major;
}
class Senior extends Student
(extent SeniorExt)
{
attribute String Major;
relationship Employee Advisor;
}

// For Figure 4.36
class Semester : Object
(extent SemesterExt)
{
attribute Integer Enrollment;
relationship Set Holidays;
}
class Course : Object
(extent CourseExt)
{
... ... ...
}
struct TranscriptRecord
{
String Grade;
Semester Semester;
Course Course;
}
class Student extends Person
(extent StudentExt)
{
attribute Set Enrolled;
}

Computer Science & Information Technology

You might also like to view...

The catch block

catch (...) is known as the ______________.

Computer Science & Information Technology

The word byte can be abbreviated as b.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Vine is a(n) ________ service for posting short videos

Fill in the blank(s) with correct word

Computer Science & Information Technology

A file stream object may be passed to a function as long as the function’s formal parameter is defined as a(n) ____________________ to the appropriate stream.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology