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
This constraint shows that the key attribute value in each tuple must be unique, i.e., no two tuples have the similar value for the key attribute. This is because the value of the

Differentiate strict two phase locking protocol and rigorous two phase locking protocol. In strict two phase locking protocol all exclusive mode locks taken by a transaction is

Saving Derived Attributes to Avoid Re-computation   As discussed, "redundancy means duplication of exact data". But, if multiple copies of same data are present in the system,

Can you help me with the following: Drop statements for all objects in the lab project. Create statements for all objects of the lab project Create indexes for foreign keys Cre

Mention various steps required to draw an E-R Diagram. Draw an E-R Diagram for Student Information System. Mention all suitable assumptions to justify your answer.

Draw an ER diagram that represents the information described below. Show all entity sets, relationship sets, primary keys, and the mapping cardinality of the relationship sets.

Consider a research paper submission process. The process starts when an author submits a draft research paper (the paper may have up to 3 authors) to the chair of the organizing c

Process to find the non-concurrent objects Once we find out non-concurrent (mutually exclusive) objects, we can fold all objects together in one thread of process or control. O


What is use of generating such tables? How can you create temporary tables? When you require a table only for a short time after that you want it to disappear automatically you