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

What is the disadvantage of a call by reference, What is the disadvantage o...

What is the disadvantage of a call by reference? During a call by reference damage or loss of data is not restricted to the subroutine, but will instantly lead to alters to th

Oracle SQL Developer, Introductory course and so does not require any fancy...

Introductory course and so does not require any fancy coding. I will provide a guidance document to help you in producing the solutions.

What is sql, What is SQL, and why is it important? SQL stands for Struc...

What is SQL, and why is it important? SQL stands for Structured Query Language, and is the most significant data processing language in use today. It is not a complete programm

Explain the concept of data mining, Question 1 Explain the concept of Fore...

Question 1 Explain the concept of Foreign Key. How a foreign key differs from a Primary Key? Can the Foreign Key accept nulls? Question 2 With a necessary example explain (i)

Explain the terms data warehousing and data mining, Question: i) Explai...

Question: i) Explain the terms data warehousing and data mining. ii) Discuss the importance of the following security principles that a digital firm should amongst others, n

Differentiate between key and superkey, Differentiate between Key and super...

Differentiate between Key and superkey? Key and superkey - A key a single attribute or a combination of two or more attributes of an entity set in which is used to identify o

Partial relation emp-get the details people with min salary, Let consider t...

Let consider the given partial relation EMP. Let us make some sub-queries for them EMPNO ENAME JOB SAL DEPTNO 7566

Explain about sql server 2000, What is the difference between SQL Server 2...

What is the difference between SQL Server 2000 complete and differential backups? A complete backup makes a copy of the whole database. A differential backup creates a copy of

1) Information about a bank is about customer, 1) Information a...

1) Information about a bank is about customers and their account. Customer has a name, address which consists of house number, area and city, and one or more phone numbers. Ac

Key to represent relationship between tables is called, Key to represent re...

Key to represent relationship amongs tables is called ? A Key that represent the relationship between tables is called Foreign Key.

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