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
Submit the SQL Statements necessary to create your database according to the following guidelines: Your SQL statements should exactly mirror your ERD. All primary keys,

How does the system cope up with a record crash when recovery is going on after the first crash? Ans:  In a system the undo and redo operations are needed to be idempotent to c

Use of partial data by applications : In common, applications work with views rather than whole relations. Thus, it may be more appropriate to work with subsets of relations rather

Define Two phase commit Two phase commit: To make sure atomicity, all the sites where a transaction is being executed must agree on the final outcome of the execution. The tran

What is Oracle databse structure? Oracle database structure: The relational model has three main aspects: Structures: Structures are well-defined objects which store th

What are attributes? Give examples. An entity is shown by a set of attributes. Attributes are descriptive properties possessed by every member of an entity set. Example: pos


A database has been designed for this beauty parlour in order for the staff to manage specific things such as bookings made by clients, payments, staff availability, level of exper

Define the Traditional System Analysis and Design Traditional System Analysis and Design (SAD) have three basic life cycle models. A typical software lifecycle consists of the

Data Warehousing & Mining 1. What is the concept of knowledge discovery in database? 2. Describe the following types of Multidimensional Data Models. • Stars, Snowflakes and