What are the basic OO features that must be supported in an ORDBMS?
What are the different ways in which objects (i.e. instances of structured types) may exist?
-> objects as rows: in typed tables (oid column = identity, UPDATE statement = modification)
What is the meaning of subtype substitutability and how is it realized in an ORDBMS?
B < A : B supports at least the operations defined in A. B can be used everywhere (variable assignments; value of expressions; arguments of methods) an A is expected.
What are typed tables and what characteristics do they provide to objects?
Tables whose columns are attributes of an ST and rows are objects with an identity
-> provide identity (additional self-referencing column) + persistence + update capability
(create table … under = possible)
How can we modify the state of objects in typed tables?
modify obj attributes by updating column values
How do table hierarchies relate to type hierarchies?
(table inherits constraints, triggers, etc)
How is the concept of object identity supported in ORDBMSs ?
(identity -> existence != values) (sharing, updates, references …)
What are the different forms of equality and how are they used in SQL?
What is the goal of UDT ordering and the different types of comparison supported?
-> goal: allow comparison (equality) of objects
-> types: EQUALS ONLZ(=, !=)ORDER FULL(all)
CREATE ORDERING FOR type [EQUALS ONLY | ORDER FULL] BY [STATE|[MAP|RELATIVE] WITH FUNCTION…]
What was added to SQL in order to support Object Views?
-> typed views + hierarchies (aka referenceable views)
-> mapping of table refs to view refs
CREATE VIEW … AS -> ONE typed table or view with same ST of view
How does the view type relate to the type of the base tables?
view type is independent, but OID must follow the rules
-> subviews: tupe must be direct subtype of superview type
base table must be proper subtable of superview base table
What are the supported composite types in SQL and how can they simulate other not supported collections types?
ROW [nullable types] -> (union)-> heterogenous elem
ARRAY [not support]-> LIST-> homogeneous elems, ordered
MULTISET [eli. dupl.] -> SET -> homogeneous elems, unordered
How can collections be constructed and accessed?
Give an overview over arrays and their use in SQL.
Give an overview over multisets, their construction and basic operations.
-> Characteristics: Varying-length, unordered
DDL: Att-name att-type MULTISET, DML: MULTISET[v1, v2, …]/MULTISET(query(1 column might be a ROW))
-> Operations: ELEMENT (m), SET (m) (elim dup.), CARDINALITY(m), UNION, EXCEPT, INTERSECT
What is the general idea and the different kinds of User-defined Routines?
What are the differences between procedures and functions in SQL?
Which additional functionality is provided by table functions?
Transform non-relational data on relational table dynamically
Returns a table (multiset of rows)
-> RETURNS TABLE (name type, name type, …)
-> RETURNS TABLE (SELECT… FROM…)
Used in FROM clause
-> SELECT … FROM TABLE (f(a,b) AS
Compare table functions and views as mechanisms for virtual tables?
TFs support dynamic parameters
What is the general idea and the algorithm for subject routine determination in SQL?
What are methods in SQL and how do they differ from functions?
-> SQL functions belonging to a structured type.
diffs:
-> Implicit SELF parameter (subject parameter)
-> Separate body and signature def (same schema as ST)
-> Invoked with dot notation: UDT-value.method()
CREATE TYPE T AS (…)
METHOD in RETURNS type;
CREATE METHOD m FOR T
BEGIN … END;
How does subject routine determination work for instance methods?
Give an overview of how the modification of object state works in SQL.
How does SQL support object encapsulation?