next up previous contents
Next: Large Object Types in Up: Multimedia Databases Seminar Report Previous: Some points to remember   Contents

Multimedia database support by SQL and other packages

As we have seen the challenges faced due to multimedia objects (Section 1.2) Therefor a DBMS must provide domain types for such types of data to deal with integration of multimedia data. Here are basic datatypes provided for multimedia data : Here is example on how to define table with large objects i.e LOB

CREATE TABLE grape
( grape_name VARCHAR2(30) ,
grape_txt CLOB DEFAULT EMPTY_CLOB() ,
picture BLOB DEFAULT EMPTY_BLOB() ,
CONSTRAINT prim_grape PRIMARY KEY (grape_name) )

here grape_text is the the description of grape and is stream of characters so is stored as CLOB. Whereas picture is stored as BLOB. Here the image will be stored in database itself. Other way is we can store it as BFILE. Then we can have used :
picture BFILE ,

Now while inserting data we have to do as :

INSERT INTO grape (grape_name, picture) VALUES ('chardonnay' , BFILENAME('PHOTO_DIR' ,'chardonnay.jpg' ))



Subsections
next up previous contents
Next: Large Object Types in Up: Multimedia Databases Seminar Report Previous: Some points to remember   Contents
root 2006-04-11