Answer to Question #159743 in Databases | SQL | Oracle | MS Access for TALHA AFZAL

Question #159743
  • Write a command to create a database named as “Salon – BC123456789” 
  • Convert each ENTITY into Oracle Table (You have to write commands for each table along with proper constraints).  
1
Expert's answer
2021-01-29T22:50:41-0500

 CREATE DATABASE 'Salon – BC123456789'

CREATE TABLE Employees(emp_id INTEGER NOT NULL PRIMARY KEY,emp_name VARCHAR2(20) NOT NULL,age INTEGER CHECK(age>=18),salary DECIMAL(10,2),commision DECIMAL(7,2),dep_id INTEGER FOREIGN KEY REFERENCES Department(dep_id));

CREATE TABLE Address (ad_id INTEGER NOT NULL PRIMARY KEY,emp_id INTEGER FOREIGN KEY REFERENCES Employees(emp_id),city VARCHAR2(10),country VARCHAR2(10));

CREATE TABLE Department (dep_id INTEGER NOT NULL PRIMARY KEY,dep_name VARCHAR2(20) DEFAULT 'General');


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS