CREATE TABLE vehicles OF carType;
Given the following example of an object type in Oracle:
CREATE TYPE carType AS OBJECT (
regNo VARCHAR2 (8),
make VARCHAR2 (20),
model VARCHAR2 (20));
State the two ways:
(a) in which the ‘vehicles’ table can be viewed;
(b) to insert a record in the ‘vehicles’ table;
(c) to retrieve records of all Ford cars from the ‘vehicles’ table.
(a) The table can be viewed as:
- a single-column table in which each row is a carType object, allowing users to
perform object-oriented operations;
- a multi-column table in which each attribute of the object type carType, namely
regNo, make and model, occupies a column, allowing users to perform relational
operations.
(b) INSERT INTO vehicles VALUES (carType (‘T567SDF’, ‘Nissan’, ‘Primera’));
INSERT INTO vehicles VALUES (‘S123NPM’, ‘Ford’, ‘Escort’);
(c) SELECT VALUE(v) FROM vehicles v WHERE v.make = ‘Ford’;
SELECT * FROM vehicles WHERE make = ‘Ford’;
You might also like to view...
Charts can contain multiple ________, quantities whose value is selected for particular circumstances and in relation to which other variable quantities may be expressed
Fill in the blank(s) with the appropriate word(s).
With what operating system was the NFTS file system first introduced?
a. Windows 95 b. Linux Kernel 1.1.000.1 c. Windows NT 3.1 d. Windows 2000
Lin is booting up his computer, and during the boot process, the computer powers down. After several unsuccessful attempts to boot his computer, he decides that he needs to start the troubleshooting process. Lin thinks that the problem could be in the power supply, so he uses a power supply tester. The test shows that the power supply is functioning properly. What should Lin check next in the troubleshooting process?
A. Processor B. Motherboard C. RAM D. Hard drive
TCP communication could be likened to which of the following?
a. Announcement over a loudspeaker b. Bullhorn at a sporting event c. Internet traffic d. Phone conversation