Question

In: Computer Science

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 keep similar personal information and a student ID number, date of birth, and expected date of graduation from high school. Coaching takes place in sessions, to each of which you assign a unique ID number. Each session consists of one coach and one student. In addition to being able to identify the coach and student involved in each session, you want to store its start date/time and end date/time.

Solutions

Expert Solution

Base on the given scenario, the entities are:

  • Coach
  • Student
  • Session

Key points:

  • Attributes of Coach : employee ID, hourly rate , first name, last name, address, phone number, e-mail .
  • Attributes of Student: student ID, date of birth, and expected date of graduation.
  • Coaching takes place in sessions, to each of which you assign a unique ID number.
  • Session attributes: Session_ID,start_time,end_time.
  • Each session consists of one coach and one student. (Session entity consists of one coredinality with both coach and student).
  • Coach may take many sessions.
  • Student also can attend many sessions.

Now,the ERD is as follows:

ER diagram:
ER model is to represent the strucre of data by using entities and attributes and their reklations. ER diagram considers entities in real world and relating with them. It is a graphical view.

Relational diagram:
In Relational database model,the entities and relations are represented by using tables. Each table contains records and attribues.

  • If we have multi-valued attribute, make that attribute as new entity.
  • In 1:1 Relationships, we are not considering relation as seperate entity. We add less priority table primary key as foreign keyb of priority table.
  • In 1:M relationships, we are not considering relation as seperate entity. We simply use primary key of one table as forign key of another table.
  • In M:M relationship, We need to create a relationship as seperate entity.

Now let us convert ER diagram to Relational tables:

1) Relationship between Coach and Session: As it contains 1:N relationship,we are adding primary key of 1 cordinal table as foreign key of N cordinal table.

Coach(Coach_ID,FirstName,Last_Name,Address,Phone,HourlyRate,Email)
Session(Session_ID,Start_Time,End_Time,Coach_ID)

2) Relationship between Student and Session: As it contains 1:N relationship,we are adding primary key of 1 cordinal table as foreign key of N cordinal table.

Student(Student_ID,FirstName,LastName,Address,Phone,DOB,ExpectedPassedOutDate)
Session(Session_ID,Start_Time,End_Time,Coach_ID,Student_ID)

So the final Tables are:


Coach(Coach_ID,FirstName,Last_Name,Address,Phone,HourlyRate,Email)
Student(Student_ID,FirstName,LastName,Address,Phone,DOB,ExpectedPassedOutDate)
Session(Session_ID,Start_Time,End_Time,Coach_ID,Student_ID)


Related Solutions

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 diagram (ER / MR / UML) for a database containing the following characteristics: •...
Draw the diagram (ER / MR / UML) for a database containing the following characteristics: • Presence sensor that stores presence information with its timestamp and its location. • Distance sensor that saves distance information with its timestamp and its location. • An actuator of a switch that energizes a bulb, where the record of its been with your timestamp and your location. • An actuator of a motor that opens a door, where the record of its been with...
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 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...
Construct an ER diagram for a database system that models data of the following situation. You...
Construct an ER diagram for a database system that models data of the following situation. You are creating a database for a stock trading company. The company has clients and financial officers. Each client is either an individual or another legal entity (e.g. another company). A client has a name, social security number, address, contact information, the date that entered the database system, and also a ranking that the trading company keeps internally (high, med, low). Financial officers have a...
I need to draw an ER diagram for a future database necessary to hold application data...
I need to draw an ER diagram for a future database necessary to hold application data for students wishing to apply for an internship at a tech company. The students will provide the following information on the application: first name, last name, email, phone number, address, city, state, postal code, major, currently enrolled in school?, expected date of graduation, web framework of choice, list of programming languages in which the student is proficient, SAT score, ACT score, GPA, 4 character...
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...
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?
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...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT