Question

In: Computer Science

Create a database and design an ER diagram for the given question. Must link the related...

Create a database and design an ER diagram for the given question. Must link the related tables then implement the design using MySQL.

Insert at least 5 records. Ensure that the data to be added are related to other tables.

Follow this format in creating the database and table:

Database format: databasename_yourname

Table format: tablename_yourname

QUESTION:

Company ABC has the following business rules.

  • A department employs many employees, but each employee is employed by only one department.
  • A division operates many departments
  • An employee may be assigned many projects, and a project may have many employees assigned to it.
  • Each department is identified by a department code, department name and phone number are kept in the system for every department.
  • For each division, the division name and division type (Sales, Marketing, or Research ) are kept in the system.
  • For the employee, name, contact number, address, and degree must be kept in the system.
  • For the project, project title, duration(no. of days), and status( completed, canceled, or in progress) are stored in the system.

REQUIREMENTS:

  • ERD with attributes, PK, and FK.
  • Use the "describe" command to view the structure of the tables.
  • Use the "select" command to view the contents of the tables.

Solutions

Expert Solution

Solution:-

Create database in MySQL

Command 1

create table Vivekmalik(Component_Id integer, Name varchar (30), description varchar(100), supplier varchar(20), comp_used_in_product varchar(50));

By the Above commmand A table with name - Vivekmalik is created in the Database .

Command 2

insert into Vivekmalik(Component_Id , Name , description, supplier , comp_used_in_product) values (101 , " KWP" , "covering plug ", " Honda" , " Spark Plug");

By the Command -2 Values are inserted into the Table we created.

According to the given question we have to insert atleat 5 Records in the table.

So, we have to repeat Command 2 again and again with different values.

Command 3

select * from Vivekmalik;

The above command is used to retrive the Data from the Table "Vivekmalik". It retrives all the values in it.

All the commands and output Table is shown in the Above image.


Related Solutions

Design an ER Diagram for the given problem. Link the tables that are related and implement...
Design an ER Diagram for the given problem. Link the tables that are related and implement your design using MySQL. Insert at least a minimum of 5 records. Ensure that the data to be added are related to other tables. Post here the screenshot of the following: Entity Relationship Diagram with attributes, PK, and FK. Use the "describe" command to view the structure of the tables. Use the "select" command to view the contents of the tables. Company ABC has...
Create the Database: The data is the same as was described in the ER Design Project...
Create the Database: The data is the same as was described in the ER Design Project assignment. In that assignment you were asked to map the ER diagram to relations in the database. Here is a formal description of the relations that you will use in this assignment: streamTV Database Relations shows(showID, title, premiere_year, network, creator, category) episode(showID, episodeID, airdate, title) showID is a foreign key to shows actor(actID, fname, lname) main_cast(showID, actorID, role) showID is a foreign key to...
Draw an ER diagram with these attributes ( ER diagram for SQL for a library database)...
Draw an ER diagram with these attributes ( ER diagram for SQL for a library database) DRAW ER DIAGRAM AS ONE FULL LIBRARY SYSTEM, NOT DIFFERENT FOR EACH ATTRIBUTE. Attributes :           Customer Cust_ID: key identifier, required, simple, single valued Cust_Name{ first name, last name}: Key Identifier, simple;composite, multivaried   Address{street, city,zip,state}: Customer address, required, composite, single can be derived from zip (placeholder, there should be another attribute here to represent the books taken out by the customer. Not sure.)           Inventory Book_ID:...
Draw an ER diagram with these attributes ( ER diagram for SQL for a library database)...
Draw an ER diagram with these attributes ( ER diagram for SQL for a library database) Attributes :           Customer Cust_ID: key identifier, required, simple, single valued Cust_Name{ first name, last name}: Key Identifier, simple;composite, multivaried   Address{street, city,zip,state}: Customer address, required, composite, single can be derived from zip (placeholder, there should be another attribute here to represent the books taken out by the customer. Not sure.)           Inventory Book_ID: Key identifier, required, simple single valued Book_Name: Key identifier, required, simple, single-valued Genre:...
Draw the ER diagram for the following: Emerging Electric wishes to create a database with the...
Draw the ER diagram for the following: Emerging Electric wishes to create a database with the following entities and attributes: (10) • Customer, with attributes Customer ID, Name, Address (Street, City, State, Zip Code), and Telephone • Location, with attributes Location ID, Address (Street, City, State, Zip Code), and Type (values of Business or Residential) • Rate, with attributes Rate Class and RatePerKWH After interviews with the owners, you have come up with the following business rules: • Customers can...
Create ER diagram for the following: A database has been designed for a Human Resources for...
Create ER diagram for the following: A database has been designed for a Human Resources for a school in the UK. The database includes records of the teachers and their holidays. The Dean of this school has the power to approve those holidays for all teachers in the school.    For each teacher, Human Resources keeps track of the Teacher's ID, name, Cell phone number(s), total number of holidays for each year, number of unemployed holiday days remaining in the...
Draw an ER diagram and write a database design outline for the following prompt: You run...
Draw an ER diagram and write a database design outline for the following prompt: You run a coaching service to help high school students prepare for the SAT exam. You have a staff of coaches, each of which has an employee ID, an hourly rate (such as $20 per hour), and personal information consisting of their first name, last name, middle name/initial, address information, phone number, mobile phone number, and e-mail address. For each high school student, you want to...
Company X database Create an ER Diagram using UML notation for the following tables, then write...
Company X database Create an ER Diagram using UML notation for the following tables, then write out in the Relational model. Company X is a manufacturing company that binds and sells books. They have hired you to create database to track their Employees, Products, customers and their orders. All employees work with book Binding, Only some are designated as Reps for customers. Reps may have many customers. But each customer can only have 1 rep. They count to record each...
Database: Our AD is Movie Theater. Create an ER diagram with the following entities: Staff, Ticket,...
Database: Our AD is Movie Theater. Create an ER diagram with the following entities: Staff, Ticket, Movie, Session, Hall, Seat, Director, Actor, Distributor, and Roles. AND also identify the type of relations between the entities with notations and explain why you used it. **Read the question carefully before you answer**
What role does the entity-relationship (ER) diagram play in the database design process? Discuss the different...
What role does the entity-relationship (ER) diagram play in the database design process? Discuss the different types of information represented in the ER diagram and the symbols used to represent them. How would you approach the diagramming process?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT