Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1 ) This question is about implementing a 1 - to - many relationship between employees and their dependents using a Varray. To answer this

1) This question is about implementing a 1-to-many relationship between employees and their dependents using a Varray. To answer this question, do the following steps:
1.1 Define an Abstract Data Type (ADT) called Dep_ADT and include in it the following fields: (1 point)
Attribute Data Type
Name VARCHAR(20)
DOB DATE
Relationship VARCHAR(20)
1.1 Use the CREATE TYPE command to create a Varray called Dependents_VA of Dep_ADT and set the size to 5.(1 point)
1.2 Create the Emp table and include in it the following attributes (the underlined attribute refers to the primary key): (1 point)
Attribute Data Type
EmpID NUMBER
Name VARCHAR(20)
Dependents Dependents_VA
1.3 Insert, in the table Emp, the following employees and their dependents: (2 points)
Employee Details Dependents Details
EmpID=0517001
Name= Andy Mirza Name=Ron
DOB=01-JAN-92
Relationship=Son
EmpID=0517002
Name= Tim Anderson Name=Nancy
DOB=22-MAY-86
Relationship=Daughter
Name=Rob
DOB=11-NOV-99
Relationship=Son
EmpID=0517003
Name= Rob Dickson Name=Mary
DOB=11-JUN-99
Relationship=Daughter
Name=Alex
DOB=11-OCT-95
Relationship=Son
EmpID=0517004
Name= Mike Reagan Name=Alfred
DOB=14-MAY-80
Relationship=Son
Name=Jane
DOB=09-DEC-85
Relationship=Daughter
Name=Timothy
DOB=19-MAR-93
Relationship=Daughter

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions