Question: DLSQL, ORACLE CREATE DATABASE 1. Develop scripts to create a database in Oracle DBMS Your task is to download the Company data stored in spreadsheet
DLSQL, ORACLE CREATE DATABASE
1. Develop scripts to create a database in Oracle DBMS
Your task is to download the Company data stored in spreadsheet ( Company.xls) and do the followings:
2. Analyze this spreadsheet and develop CREATE TABLE script posted for this database. Do this in two ways
2.1 Foreign key is part of create table command (unless the relationship does not permit the foreign key to be part of create command).
2.2 Foreign key is not part of the create table but it is implemented using ALTER command
You can refer to the data dictionary that is posted for this assignment
3. Using notepad, develop an INSERT script to populate the Company database in your Oracle schema. Make sure the order of attributes in your INSERT script matches the order of attributes defined in the CREATE TABLE script
4. Place your insert commands after the CREATE TABLE commands and save it as populate_Company_DB
5. Place your code within an anonymous block (PL/SQL program). This program should include exception handling to catch error and take correct action if error happens
6. Run the program and make sure that database can be created without any error. If you run the script again, it has to run without any errors- (drop, create and insert).
***************************************************************************************************************************************************************** Please note that there are 2 files, one with foreign keys included in create table and one where the foreignkeys are in alter commands. Please You can find the Company XLSX file here: https://drive.google.com/open?id=0Bzum6VJXi9lUdzJYa0tZbHhpbUk Here is my attempt at doing this question. Somewhat unsuccessful, but you can use it to improvise https://codeshare.io/anPO0j
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
