Home | Previous Page | Next Page   Appendix B. Demonstration SQL > SQL Files for the Relational Database Model >

opt_disk.sql

The following command file provides an example of a SELECT statement on an optical-disc subsystem. It includes the read-only family() and volume() operators that support optical storage. (This is available only with the Optical Subsystem.)

The query generates a list of the volumes that contain pictures of bicycle helmets. One row of output (family, volume) is generated for each data row that contains a picture of a bicycle helmet. The family() operator returns the name of the optical family where an optical blob column is stored, and volume() returns the number of the volume where an optical blob column is stored. These functions are valid only for data stored on optical media.

SELECT family(cat_picture), volume(cat_picture)
   FROM catalog
   WHERE stock_num = 110;
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]