(Solved) : Consider Following Relational Schemas Actor Aname Varchar2 20 Role Varchar2 15 Sex Char Am Q31677086 . . .
Consider the following relational schemas
Actor(aname: varchar2(20); role: varchar2(15); sex: char; amount:number(6); city:varchar2(10))
Performs(aname: varchar2(20); title: varchar2(20))
Skit(title: varchar2(20); theme: varchar2(15); duration: number(3);rating:varchar2(3))
Do the following:
1. Create the above tables with primary keys on appropriate fields.Enforce the foreign keys on fields of ‘Performs’ table.
2. Put a check constraint to see that rating of the skit should beany one of these A, A+, and A++. Also, see that the fields ‘role’and ‘amount’ should be unique and not empty respectively. Include‘street’ column in the’Actor’ table of string data type.
3. Add at least 6 records to each table as per the requirements ofthe queries given below
4. Change the city to ‘Chennai’ of an actor whose name start with‘J’ and acted in the skit with title ends with ‘n’.
5. Display number of male actors acted and their total remunerationskit wise.
6. Retrieve names of actors who perform in more than or equal to 2skits.
7. List skit names in which female artists acted is more than orequal to male artists acted. (Sub Query)
8. Create a virtual table that shows skit names with rating A+ andin which actors have been paid an amount less than or equal toRs.25000.
Mandatory:Display the structure and content of each table for each change andstore it in your file to be uploaded.Answer thefollowing queries in SQL and obtain required output (Output for each querybe there in your file and it carries half of the marks allotted tothe query)
Expert Answer
Answer to Consider Following Relational Schemas Actor Aname Varchar2 20 Role Varchar2 15 Sex Char Am Q31677086 . . .
OR