Create table employee and enter employee data in sql, Database Management System

Assignment Help:

Create table employee and enter employee data in SQL?

Consider the following relational schemas:
EMPLOYEE (EMPLOYEE_NAME, STREET, CITY)
WORKS (EMPLOYEE_NAME, COMPANYNAME, SALARY)
COMPANY (COMPANY_NAME, CITY)
Specify the table definitions in SQL.

Ans. CREATE TABLE EMPLOYEE
( EMPLOYEE_NAME VARCHAR2(20) PRIMARY KEY,
STREET VARCHAR2(20),
CITY VARCHAR2(15));
CREATE TABLE COMPANY
( COMPANY_NAME VARCHAR2(50) PRIMARY KEY,
CITY VARCHAR2(15));
CREATE TABLE WORKS
( EMPLOYEE_NAME VARCHAR2(20)
REFERENCES EMPLOYEE(EMPLOYEE_NAME,
COMPANYNAME VARCHAR2(50)
REFERENCES COMPANY(COMPANY_NAME,
SALARY NUMBER(6),
CONSTRAINT WORKS_PK PRIMARY KEY(EMPLOYEE_NAME,
COMPANY_NAME));


Related Discussions:- Create table employee and enter employee data in sql

How the time stamps are implemented, How the time stamps are implemented ...

How the time stamps are implemented Use the value of the system clock as the time stamp. That is a transaction's time stamp is equivalent to the value of the clock when the tra

Explain how the law ensures data protection and security, Question 1: (...

Question 1: (a) Explain the legal meaning of :- (i) Computer Service Person (ii) Data holding (b) Explain how the law ensures Data protection and Security. Qu

Transaction, .#question. Discuss the problem which may arise during concurr...

.#question. Discuss the problem which may arise during concurrency control and recovery in distributed database which are not encountered in controlized database environment.

Discuss the term- design optimization, Discuss the term- Design Optimizatio...

Discuss the term- Design Optimization  We have seen various ways of representing the objects.The fundamental design model uses analysis model as the framework for implementati

Improved performance, Improved performance: As the data is located near the...

Improved performance: As the data is located near the site of its demand, and given the inherent parallelism because of multiple copies, speed of database access may be good for di

What are the various states of transaction process, What are the various st...

What are the various states through which a transaction passes through in its lifetime?  Briefly discuss all the events that causes transition from one state to another.   Ans:

OLAP CUBES, 1) Define a job scheduling strategy that will meet business req...

1) Define a job scheduling strategy that will meet business requirement of reporting availability by 6am CST for the following cubes? Show the job scheduling dependencies in a pict

Define union compatibility, Define union compatibility? Explain why INTERSE...

Define union compatibility? Explain why INTERSECTION of two relations cannot be performed if they are not union compatible? Two relations R(A1, A2,-------, An) and S(B1, B2,--

Oracle, Extend your CREATE TABLE statement from problem 3 with referential ...

Extend your CREATE TABLE statement from problem 3 with referential integrity constraints. Updates and deletes on related rows are restricted. 6. From examination of the sample data

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd