Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please solve it using SQL Developer: Part A: Create the following tables using SQL Developer, based on the given data types and constraints. Please note

Please solve it using SQL Developer:

image text in transcribedimage text in transcribed

Part A: Create the following tables using SQL Developer, based on the given data types and constraints. Please note that you must study the structure of the tables/columns thoroughly and create the tables using SQL queries. Part B: Write SQL queries of each of the following questions: 1. Write SQL query to show all the tables you have created. You need to use a single query to show all the table names in a single column. 2. Write SQL query to show all the constraints for the tables you have created above. 3. Insert one row in each of the tables. You can assume the values of your choice. Please keep in mind to consider referential integrity while inserting the values. 4. Add a column named salary with a datatype of NUMBER(9,2) to the ARTISTMANAGER table. Ensure that the amount entered should not be less than 0 . 5. There can be a change in the width of the mail on Artists. Write SQL query to change the datatype of all the Artists's email to VARCHAR2(55). 6. Change the CONTRACT table so that only less than 100 can be entered in the column "RoxaltyPercentage". 7. Change the ARTIST table so that NULL values can't be entered in the name columns (First and Last). 8. Write SQL query to remove the column ArtistType from the ARTIST table. 9. Write SQL queries to delete the data from all the tables. 10. Write SQL queries to remove all the tables from one by one. You need to keep the sequence of the removal in mind to remove the tables successfully. You are not allowed to use CASCADE option. Submission Instructions: You are required to submit 2 files for this assignment under > Assignments > Assignment 2: 1. One word file, that will contain all the screen shots of the code and the corresponding output. Name the file as "Assignment 2". 2. One SQL file, that should contain all the SQL queries. You must include all the questions (in comments) before each SQL query. Submit the file with the name "Assignment 2 SQL". In the beginning of the file, you must include the following lines (in comments): a. Student Number b. Student Name 3. Marks will be deducted for improper submission

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

Step: 3

blur-text-image

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

Databases Illuminated

Authors: Catherine M Ricardo, Susan D Urban

3rd Edition

1284056945, 9781284056945

More Books

Students also viewed these Databases questions