Represent grades as a UDT, Grade, with a method, value(), that returns the grade's numeric value.

Use the following partially dened schema to answer the queries below.


CREATE TABLE Student AS
Id INTEGER,
Name CHAR(20),
...
Transcript TranscriptType MULTISET
CREATE TYPE TranscriptType
Course REF(CourseType) SCOPE Course,
...
Grade CHAR(2)


The type CourseType is defined as usual, with character string attributes such as CrsCode,
DeptId, etc.



CREATE TYPE GradeType AS (
LetterValue CHAR(2) )
METHOD value() RETURNS DECIMAL(3);
CREATE METHOD value() FOR GradeType
RETURNS DECIMAL(3)
LANGUAGE SQL
BEGIN
IF LetterValue = 'A' THEN RETURN 4;
IF LetterValue = 'A-' THEN RETURN 3.66;
... ... ...
END

Computer Science & Information Technology

You might also like to view...

A(n) ___________________ loop will repeat an unlimited number of times.

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

Computer Science & Information Technology

Appear, Fade, Fly In, and Swivel are all types of:

A) transitions. B) animations. C) templates. D) themes.

Computer Science & Information Technology

Assume d and x are integers: d = 5; x = 2 * ++d; What is the value of x?

A. 10 B. 11 C. 12 D. 13

Computer Science & Information Technology

What are some negotiation tips for vendor agreements the book recommends?

What will be an ideal response?

Computer Science & Information Technology