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

Create database for car application, The Database MySQL scripts cars_f...

The Database MySQL scripts cars_for_sale.sql and car_details.sql containing the data to use for this task have been supplied. To complete this task, you need to first create

Properties of a transaction , Properties of a Transaction        A tra...

Properties of a Transaction        A transaction has four main properties. These are: Atomicity Consistency Isolation or Independence Durability or Permanen

What creates while a primary key is combined with a foreign, What it create...

What it creates while a primary key is combined with a foreign key? It creates Parent-Child relation ship between the tables that connect them while a primary key is combined w

Fragmentation-design of distributed databases, Fragmentation: It is defini...

Fragmentation: It is definite as partitioning of a relation into various fragments.Every fragment can be stored at a dissimilar site.

What is a dataset, What is a dataset? A dataset is an in-memory databas...

What is a dataset? A dataset is an in-memory database that is disconnected from any regular database, but has all the significant characteristics of a regular database. Dataset

Describe the relational model, a) Distinguish between ‘database' and ‘Data...

a) Distinguish between ‘database' and ‘Database Management Systems (DBMS)'. b) List and briefly describe five potential benefits of the database approach compared to conventio

Explain hashing techniques, Explain Hashing techniques The hashing tech...

Explain Hashing techniques The hashing techniques can be categorized as: Static Hashing Techniques - In this method, the data can be viewed a collection of buckets, along with

I want simple visual basic script, I want a script that will run, and updat...

I want a script that will run, and update my virtual machine's LAN settings (proxy server and port), and also re-configure the Firefox User Agent. I want a script that will run,

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