User-defined ADTs
- How to define user-defined ADTs?
- define (register) methods that
- enable the DBMS to read in objects of this type
- enable the DBMS to output objects of this type
- compute the amount of storage required to hold the object
- Example: CREATE ABSTRACT DATA TYPE polygon
(internallength: VARIABLE, input: POLY_IN, output: POLY_OUT);
- How to store user-defined ADTs?
- bigger than single disk page (BLOBs):
- Store in a location different from the tuples that contain them
- Use disk-based pointers to link tuples with the objects they contain
- Constructed objects (Array types):
- Traditional arrangement row by row: A11,...A1n,A21..A2n,Am1...Amn
- Problem: high I/O cost for retrieving non-contiguous subarrays
- Solution: store array by chunks (A11,A12,A21,A22) based on usage