What are the types of reference?explain it with suitable examples?
Object oriented language given the ability to refer the object attribute of the type can be referred to the specified type. We can describe the type dept with a field name and a field head which is reference to the type person and a table dept of the type dept as followed
Create type dept(
Name varchar(20),
Head ref(person)scope people
)
Create table dept of dept
The table definition must state that the reverence is derived and must still state a self referential attribute name. When interesting a tuple for dept we can then use
Insert into dept
Values('CS','john')