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

Data fragmentation in distributed database system, brief history,definition...

brief history,definition,current trends and future trends if any of data fragmentation

Determine the benefits of object oriented design, Determine the benefits of...

Determine the benefits of Object oriented design OOD also gives reusability, which saves time, costs and productivity gains through direct mapping to properties of Object-Orie

Define object-oriented database, Question : Object-Oriented Database (O...

Question : Object-Oriented Database (OODM) is defined as a logical data model that captures the semantics of objects supported in object-oriented programming. An Object-Oriente

Explain the need for the bcnf normal form, Surgeons identified by doctor ID...

Surgeons identified by doctor ID (DOCID) operate on patients identified by patient ID (PATID) in operating theaters identified by room numbers (ROOMNO). Each surgeon can operate on

Define variable-length records arise in database, What are the ways in whic...

What are the ways in which the variable-length records arise in database systems? Storage of many record types in a file. Record types that permit variable lengths for one o

E-R MODEL, WHAT IS MEANT BY E-R MODEL

WHAT IS MEANT BY E-R MODEL

External failure-database recovery and security, External failure : A failu...

External failure : A failure can also result because of an external cause, such as earthquakes, fire, floods, etc. The database must be duly backed up to avoid troubles occurring d

Define serializable schedule, Define Serializable schedule Serializable...

Define Serializable schedule Serializable schedule: An interleaved schedule of much more than one transaction is known as a serializable schedule, if it is equal to some serial

DBMS, give some example real life situation where DBMS are most suitable

give some example real life situation where DBMS are most suitable

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