Create a company database, Database Management System

Company Database:

a-)Here is the ER Model

1172_Create a Company Database 1.png

b-)Here is the Relational Model:

 

681_Create a Company Database 2.png

 
IMPORTANT NOTICE FOR SOLUTION TYPE:

***THIS ASSIGNMENT WILL BE SOLVED BY THE FOLLOWING THIS TYPE AND EXAMPLE!!!

SOLUTION TYPE:

SELECT   Distinct Lname, Fname

FROM       Employee, Department, Dependent

WHERE    SSN=mgrssn and ssn=essn;

SOLUTION TYPE:

SELECT   pnumber,dnum,lname,address,bdate

FROM       project,department,employee

WHERE    dnum=dnumber and mgrssn=ssn and plocation='Stafford';

EXAMPLE:

STEP# 1: CREATE TABLE dependent

( essn  char(9),

dependent_namevarchar(15),

sex            char,

bdate          date,


relationshipvarchar(8),

primary key (essn,dependent_name));

STEP #2:

INSERT INTO dependent VALUES ('333445555','Alice','F','05-APR-86','Daughter');

INSERT INTO dependent VALUES ('333445555','Theodore','M','25-OCT-83','Son');

INSERT INTO dependent VALUES ('333445555','Joy','F','03-MAY-58','Spouse');

INSERT INTO dependent VALUES ('987654321','Abner','M','28-FEB-42','Spouse');

INSERT INTO dependent VALUES ('123456789','Michael','M','01-JAN-78','Son');

INSERT INTO dependent VALUES ('123456789','Alice','F', '31-DEC-88','Daughter');

INSERT INTO dependent VALUES ('123456789','Elizabeth','F','05-MAY-67','Spouse');

STEP #3: ALTER TABLE dependent ADD CONSTRAINT dependent_essn_fk foreign key (essn)  references employee(ssn);

Posted Date: 2/25/2013 1:53:29 AM | Location : United States







Related Discussions:- Create a company database, Assignment Help, Ask Question on Create a company database, Get Answer, Expert's Help, Create a company database Discussions

Write discussion on Create a company database
Your posts are moderated
Related Questions
Define Network DBMS The NDBMS is built primarily on a one-to-many relationship, but where a parent-child representation between the data items cannot be ensured. This may occur

System R was developed and designed over a period of 1974-79 at IBM San Jose Research Company. Its purpose was to illustrate that it is possible to create a Relational System tha

Project Description: We have purchased facebook style chat software which we are using with our site. It is prepared in PHP but the rest of the site is developed asp.net. Iss

what is file organization? what are file organization techniques.explain in detail? explain random file organization technique, multikey file organization technique?what is indexin

Which language has presently become the defacto standard for interfacing application programs along with relational database system? The language which has recently become the


Draw an EER diagram that captures the "is-a" hierarchy of students in another simple database. The database captures both the "basic" information (say, student ID and student name)

At its most essential level the DBMS architecture can be divide into two parts: the back end and the front end. The back end is responsible for managing the physical database an

How are tables stored on Disk? We realise that every record of a table can have different amounts of data. This is due to in some records; some attribute values may be "zero".

Question 1 Define OLTP? Explain the Differences between OLTP and Data Warehouse Question 2 What is Architecture? Explain various components involved in it Question