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

What is vertical fragmentation, What is vertical fragmentation? Vertica...

What is vertical fragmentation? Vertical fragmentation divides the relation by decomposing the scheme R of relation r.

Selective replication-data replication, Selective replication: This is a c...

Selective replication: This is a combination of generating small fragments of relation and replicating them rather than a entire relation. The data should be fragmented on require

Differentiate between b-tree and b+ tree, Differentiate between B-tree and ...

Differentiate between B-tree and B + tree    Ans:  A B-tree (or Balanced Tree) is a search tree along with additional constraints that makes sure that the tree is all the time

How do you find the final model after iterative analysis, How do you find t...

How do you find the final model after iterative analysis? Why is iterative analysis of any of the problem needed? The final model serves as the base for system architectur

Write a short note on built in function in qbe, Write a short note on built...

Write a short note on built in function in QBE? Built in function in QBE: QBE involves various built in functions like AVG, MAX,MIN,SUM and CNT. We must prefix these operator

Explain b-tree, What is B-Tree? A B-tree eliminates the redundant stora...

What is B-Tree? A B-tree eliminates the redundant storage of search-key values .It permits search key values to appear only once.

What is gathering information and producing erd, What is Gathering informat...

What is Gathering information and Producing ERD Gathering information: This could be a written document that explains the system in question with reasonable quantity of detai

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