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

Explain candidate key and super key, Explain Candidate Key and Super Key ...

Explain Candidate Key and Super Key A super key is a set of one or more than attributes that, taken collectively, permits us to identify uniquely a tuple in the relation. Wher

Database, 3. (10 points) Assume that you have been presented with the follo...

3. (10 points) Assume that you have been presented with the following relation for the Baxter Aviation database: Charters (Pilot#, Pilot name, Aircraft ID#, #seats, Village, Fligh

Create a database for store company details, You group has been hired by  T...

You group has been hired by  TrainingrUs.com to keeps track of training revenues. TrainingrUS.com wants you to keep scheduling. COURSE table contains following information:

What are the three classes of sql expression, What are the three classes of...

What are the three classes of SQL expression? SQL expression consists of three clauses:  Select  From  Where

How does the system cope up with a record crash, How does the system cope u...

How does the system cope up with a record crash when recovery is going on after the first crash? Ans:  In a system the undo and redo operations are needed to be idempotent to c

Illustrate the cardinality of relationship, Cardinality of Relationship ...

Cardinality of Relationship One-to-One Only one entity of the first set is linked to only one entity of the second set. E.g. A teacher teaches a student. Only one teacher

What is dml (data manipulation language)?, This language that enable user m...

This language that enable user manipulate to or access data as organized by appropriate data model. Low level or Procedural DML : DML needs a user to specify what data ar

What is the use of a slotted-page structure, What is the use of a slotted-p...

What is the use of a slotted-page structure and what is the information are there in the header? The slotted-page structure is used for organizing records within a one block.

Functional dependencies, CAR SALE (Car_id, Option_type, Option_listprice, S...

CAR SALE (Car_id, Option_type, Option_listprice, Sale_date, Option_discountedprice) This relation refers to options installed in cars (e.g., cruise control) that were sold at a de

The average amount of their orders , Make SQL statements for the following ...

Make SQL statements for the following scenarios. Your response should contain SQL statement, output and any other assumptions you have made to arrive at the answer. For Colorado cu

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