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

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));

Posted Date: 5/10/2013 2:10:28 AM | Location : United States







Related Discussions:- Create table employee and enter employee data in sql, Assignment Help, Ask Question on Create table employee and enter employee data in sql, Get Answer, Expert's Help, Create table employee and enter employee data in sql Discussions

Write discussion on Create table employee and enter employee data in sql
Your posts are moderated
Related Questions
What is called an evaluation primitive? A relational algebra operation annotated with instructions on how to evaluate is known as an evaluation primitive.

Explain the Role of a database administrator a. Defining the Schema   The DBA describes the schema which consists of the structure of the data in the application. The DBA

What is RDBMS? Relational Data Base Management Systems (RDBMS) are database management systems that maintain data records and indices in tables. Relationships may be formed and

Task Part A. Create an ERD from a business problem. (50 marks) Read the following problem and complete the tasks listed below. THE ABS Blood Bank Australian Blood Services (ABS) i

State the meaning of Object Representation  The term object representation means "to represent object with the help of objects model symbols". Implementing objects is too simp

Question: One of the tasks a database management system must perform is to ensure that the data is still intact in the face of software and hardware failure. This task is known


how to calculate frequency count of algorithm

Database design Database tables will be created for you on the Technology web server. The schema will be as follows. Please note that this is a simplified database structure, d

Can you assist me in Database management system? I need help in my courses, please email me at and get back me soon...