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 Boyce codd normal form A relation schema R is in BCNF with respect to a set F of functional dependencies if, for all functional dependencies in F + of the form.α ->β.

what is lossless & dependency preserving decomposition ?

let us consider a table having 2200 records and the fixed size of the table to be considered as 25.then how many numbers of table is requredto perform horizontal fragmentation

Describe the tools that are available for managing MySQL Server. Given below are the tools to manage MySQL server: mysqld - MySQL server daemon. This is used to begain t

What are the several forms of identity? a) Value b) Name c) Built-in

Lack of Redundancy We have talked about the problems of repetition of information in a database. Such repetition should be stay away as much as possible. Let us state once again t

What are metrics for choosing the best algorithm? Matrices for choosing the best algorithms are as below: Computational complexity Ease of understand ability and im


What are the two integrity rules?  Ans:  The two integrity rules are: Entity Integrity Rule & Referential Integrity Rule.   Entity Integrity Rule - If the attribute A of rel

What is a data dictionary? Data Dictionary is a main source of data in a data management system.  Its major function is to carry the creation and management of data definition