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
A database named yourusernameFMA has been set up for you to use for this assignment.  For the FMA you must create the required tables and run the queries using this database.  If y

Domain Constraints Domain constraints are primarily formed for defining the logically correct values for an attribute of a relation. The relation allows attributes of a relatio

State the functional approach of object oriented methods Moving from a functional approach to an object oriented one needs a translation of functional model elements into objec

In E-R Diagram how relationship type is represented ? In E-R Diagram relationship type is represented as a Diamond.

Copy Data from One Database to another Database Project Description: I am having two MySQL databases with same tables. I just need to copy one Data from one to another dat

What is equi join? Equi Join - It generates all the combinations of tuples from two relations which satisfy a join condition along with only equality comparison (=).

#ques Define a job scheduling strategy that will meet business requirement of reporting availability by 6am CST for the following cubes? Show the job scheduling dependencies in a p

What are the two main goals of parallelism? Load -balance multiple small accesses, so that the  throughput of such accesses enhances. Parallelize large accesses so that the res

Question: Consider the following database relations for a textbook ordering system used by a college bookshop: Book (b-copy#, bname, ISBN#, author, price, subject) Order (s#

What do you understand by transitive dependencies? Define with an example any two problems that can take place in the database if transitive dependencies are available in the datab