Create a company database, Database Management System

Assignment Help:

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);


Related Discussions:- Create a company database

Define a table in sql known as client for store information, Define a table...

Define a table in SQL known as Client that is used to store information about the clients. Define CLIENT_NO as the primary key whose first letter must begin with ‘C'. Also ensure t

Determine the benefits of object oriented design, Determine the benefits of...

Determine the benefits of Object oriented design OOD also gives reusability, which saves time, costs and productivity gains through direct mapping to properties of Object-Orie

Database schemas and dependencies, 1. Staff(staffID, firstName, lastName, a...

1. Staff(staffID, firstName, lastName, availabilityID, experience, phone, mobile, email); 2. Availability(availabilityID, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday,

3-schema architecture, Gyan Gurukul is a software company that provides sof...

Gyan Gurukul is a software company that provides software related solution. Ashutosh Dubey who is the director of Gyan Gurukul want a three-level schema architecture for the Gyan G

Define the terms key attribute and value set, Define the terms i) Key attr...

Define the terms i) Key attribute ii) Value set Key attribute: An entity type usually has an attribute whose values are exact from each individual entity in the collection. Su

Explain the shadow paging recovery technique, Explain the shadow paging rec...

Explain the shadow paging recovery technique.  Ans: Shadow paging is a method used to acquire atomic and durable transactions, and provides the capability to manipulate pages i

What are advantages of using an index and disadvantages, What are the advan...

What are the advantages of by using an index and what are its disadvantages ? In difference, if the search key of a secondary index is not a candidate key, it is not sufficient

What is a hash index, What is a hash index? A hash index organizes the ...

What is a hash index? A hash index organizes the search keys, with their associated pointers, into a hash file structure.

What is object containment, What is object containment? References amon...

What is object containment? References among objects can be used to model dissimilar real-world concepts.

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd