Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help finishing this question Complete an EER diagram of the company database described in chapter 4. You may use Visio, PowerPoint, MySQL Workbench,

image text in transcribedI need help finishing this question

Complete an EER diagram of the company database described in chapter 4. You may use Visio, PowerPoint, MySQL Workbench, or gliffy.com

Create the database based on your design. Write the Create table statements (even if you create the tables in MS Access, you need to provide the Create Table statements). Keep in mind keys and referential integrity requirements

Under Resources you will find lab documents. Under chapter 4 use the data files provided to load the database.

Prepare the following queries:

Select * from each table

Complete a query with at least 2 joins

Complete a query with 2 joins and the use of an aggregate function like average or sum

Complete a query using an outer join

You should submit your EER diagram, DDL statements, Load DDL, and queries in a single document by the end of the course

The lab is worth 12% of your grade::

This is what I have so far:

CREATE DATABASE company;

CREATE TABLE employee ( SSN int, LName varchar(255), MName varchar(255), FName varchar(255), Address varchar(255), Salary int );

CREATE TABLE department ( Name varchar(255), Location varchar(255), Number int );

CREATE TABLE Project ( Number int, Name varchar(255), Location varchar(255), );

CREATE TABLE Dependent ( Age int, Name varchar(255), );

For inserting values into the table there is one syntax which you can repeat for inserting values to each table INSERT INTO table_name (col1, col2, col3, ...) VALUES (val1, val2, val3, ...); Repeat this step until you have finished inserting all the data into the respective table.

The inner join statement for retrieving from which department the employee belongs is as follows: SELECT employee.Name, department.Name FROM employee INNER JOIN department ON employee.Name=department.Name;

This is the ER diagram and the complete database creation of the company database.

ER DIAGRAM FOR THE COMPANY Mnarne unbe Faaue Address Salary Narne ocanon oc ation Lnane Naine -Warks Far- DEPARTMENT 21 NTROI epenrleuts PROJECT PROJECT ocation uinbei DEPENDENI elationshi

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions