Next: Large Object Types in
Up: Multimedia Databases Seminar Report
Previous: Some points to remember
Contents
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 :
- Large Object Domains these are long unstructured sequences of data often of two kinds
- Binary Large Objects BLOBs, which are an unstructured sequence of bytes
- Character Large Objects CLOBs, which are an unstructured sequence of characters
file references instead of holding the data, a file reference contains a link to the data we will see the use of OLE in Access.large objects at best allow you to extract sections or to concatenate them file references mean that the DBMS has no access the data at all.
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: Large Object Types in
Up: Multimedia Databases Seminar Report
Previous: Some points to remember
Contents
root
2006-04-11