Abstract Data Types in SQL3
- Row types provide a lot of the functionality of objects:
- allow us to modify objects (unlike OQL), but
- do not provide encapsulation.
- We can modify objects arbitrarily using SQL3 commands.
- In OQL: we can query, but not modify only via methods.
- Abstract data types: are used as components of tuples.
CREATE TYPE <type name> (
list of attributes and their types
optional declaration of the comparison functions: =, <
declaration of methods for the type