xman12 0 Newbie Poster

Hi Guys

I need a hand from a kind SQL*Plus guru to create Oracle abstract data types and collections using SQL*Plus

I. Using Oracle’s SQLPlus create Abstract Data Type definitions for the Client and Child member entities called Client_Type and Child_Type respectively. Attributes for Client_Type include client number, name, address, telephone numbers and next of kin. Attributes for Child_Type attributes are child number, name, date of birth, sex. Include any links as necessary.


II. Create an Object table for the Child entity called OTChild. Use the ‘Insert’ command to add two rows to this table and use the ‘Select * from OTChild’ command to display the contents of the table.


III. An alternative to the previous scheme of creating two object tables (as in the previous question) is to include the Child records for a particular client as a nested table within the Client object table.

Create an amended ADT definition for the Child called Child_Type2. Use the Child_Type2 type definition as the basis of a nested table in amended Client table, creating the table for the client (called OTClient) which includes a nested table of children.

Use the ‘Insert’ command to add a row to OTClient for a client with 2 children. The information to do this is not in the text book. To find out how do a Google search using, for example ‘Oracle populating nested table’. Now use the ‘Select * from OTClient’ command to display the contents of the table and the command ‘describe OTClient’ to describe the table you have created.

Please help me out.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.