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
I have to create a database about anything of my choice. It has to contain 4 queries, and 4 forms. It can be anything as simple as a shoe inventory with numbers - is this a service

what are information system hirarchy?

Describe the different RAID levels.  Discuss the choices of the different RAID levels for different applications.          Ans:   There are several combinations of these approa

Explain weak and strong entity sets? Weak and Strong entity sets: A physically powerful entity set has a primary key. All tuples in the group are distinguishable through that k

What is Index? An index is a physical structure having pointers to the data. Indices are created in an existing table to locate rows more quickly and efficiently. It is possibl

Normalize the following table upto and including the 3NF. Submit a 1 page printout of only the final set of normalized tables in Data Architect. Just use Data Architect to do the t

Need for Multiple Access Paths In practice, most of the online information systems need the support of multi-key files. For example, consider a banking database application hav

What are the storage types? The storage types are: a) Volatile storage b) Nonvolatile storage

sir, could anybody help me in getting complete information about the mentioned topic

Create a view emp_dep containing e_name and number of dependents from the tables employee and dependent of (i) CREATE VIEW emp_dept AS SELECT ename, COUNT(*) FROM employee, dep