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

Estimate the transaction states, Suppose an instruction takes 1 nanosecond ...

Suppose an instruction takes 1 nanosecond to execute (on average), a page fault takes 20 microseconds of processor time, and it takes 300 microseconds of disk time to read or write

Sql select employee from table with at least one department, Consider emplo...

Consider employee (e_no, e_name, e_salary, d_code), dept (d_code, d_name) and dependent (depndt_name, e_no, relation). Show the names of employees in purchase and accounts departm

The logical dbms architecture, Normal 0 false false false ...

Normal 0 false false false EN-IN X-NONE X-NONE

Note gate, i want notes on this topic

i want notes on this topic

Explain the concepts of relational data model, Explain the concepts of rela...

Explain the concepts of relational data model? Relational Data Model - The relational model was first introduced through Prof. E.F. Codd of the IBM Research in the year 1970

Define signal, Define Signal. It allows methods to respond to events tr...

Define Signal. It allows methods to respond to events triggered by themselves or by other processes. Each signal corresponds to an exacting event. A signal is represented in Sy

A set of possible data values is called, A set of possible data values is c...

A set of possible data values is called? A set of possible data values is called as domain.

Example of grant create session to mca12, Example -GRANT CREATE SESSION TO ...

Example -GRANT CREATE SESSION TO MCA12; (This command gives system level permission on creating a session - not portable) GRANT SELECT ON EMP TO MCA12; (Object level permi

What is the need for triggers, What is the need for triggers? Triggers ...

What is the need for triggers? Triggers are useful mechanisms for alerting humans or for starting particular tasks automatically when particular conditions are met.

Availability-data replication, Availability: A site having the copy of a r...

Availability: A site having the copy of a replicated relation fails, even then the relation may be found in another site. Therefore, the system may carry on to process at least th

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