Programming Homework Help
Arizona State University Wk 5 High Level Database Models MySQL Task
1.Review the prompt and draw your diagram in MySQL.
Design an E/R diagram for a bank, including information about customers and their accounts. For the customers, keep the following information: name, address, phone, and social security number. For accounts, keep the following information: account number, type (saving, checking), and balance. Your diagram should show the ownership relation between a customer and an account. You should also show all primary keys in your diagram. When using the MySQL model, you can assume any appropriate datatype for each column.
2. Review the prompt and draw your diagram in MySQL.
Change your diagram in the previous question (#1) so that a customer can have a set of addresses that are street-city-state and a set of phones. You are not allowed to use nonprimitive datatype such as a set value. Therefore, you should add other entity sets appropriate for the new conditions. Please also show all primary keys for all entities and relationships (e.g. one-many).
3. Review the prompt and draw your diagram in MySQL.
Design a database for the university registrar. This database should include information about students, departments, professors, courses, which students are enrolled in which courses, which professor are teaching which courses, student grades, TA’s for a course (TA’s are students), which courses a department offers, and any other information you think is appropriate. In addition, consider the following assumptions in your design:
- Each professor only works in one department.
- A course has at most one TA.
- A course is only taught by one professor and offered by one department.
- Students and professors have been assigned unique email ids.
- A course is uniquely identified by the course number, section number, and semester (e.g. cs220-1 spring 21).
You should also identify all the primary keys and relation types (e.g. one-many).
4. Consider the previous question (#3). Draw its UML diagram. You do not use MySQL for this question.
5. Review the prompt and draw your diagrams in MySQL.
Draw E/R diagrams for the following cases considering weak entity sets. In each case, indicate primary keys.
- For entity sets courses and departments, suppose that a unique department gives a course, but its only attribute is its number. Different departments can offer courses with the same number. Each department has a unique name.
- Consider entity sets leagues, teams, and players. League names are unique. No league has two teams with the same name. No team has two players with the same number. However, there can be players with the same numbers on different teams, and there can be teams with the same name in different leagues.