M6D1: Query Your Classmate’s Database
2929 unread replies.3636 replies.
In this sixth module, you will practice getting data back out of your database and manipulating data that are resident there. There are many ways for querying data and many ways to aggregate, group, and join your data. In this module’s readings, you learned all about data manipulation language (DML), which is used to pull data out of a database and to manipulate data within the database. For the following discussion, you will get some practice with querying by doing some roleplay of real-world scenarios with your classmates.
Step I
Select an ER diagram that you have worked on during one of the discussions in a prior module. This ER diagram should be in at least third normal form and contain at least three tables and at least two relationships. Post an initial message, in which you do the following:
1. Write descriptions for three data querying requirements that could be answered from the data stored in a database represented by your ER diagram. Your classmates will provide answers based on the requirements. Answers to your three requests should contain at least one JOIN; an aggregation function ; a GROUP By clause; and a WHERE or HAVING clause. Some examples:
1. All sales transactions that occurred in the month of March
2. All students enrolled in IT371 for the Fall 2018 semester
3. The total amount spent per month on hair products
2. Write descriptions for two modifications for data already in the database. Some examples:
1. Change Bobby Ray’s last name to “Jones”
2. Change student number 64’s birth date to 1/1/2001
3. Write descriptions for two deletions for data already in the database. Some examples:
1. Delete student number 23
2. Delete all students enrollments for IT371 for the Fall 2018 semester
4. Attach your ER diagram to your post
or
Step II
Select at least three classmates whose diagrams and queries sound . Write DML statements for each query and post them as replies to your classmates. Do not use a query generator or graphical tool to write these; write them on your own and test them in your chosen DBMS before posting. Try to pick classmates whose requirements have not been answered.
Consult the Discussion Posting Guide for information about writing your discussion posts. It is recommended that you write your post in a document first. Check your work and correct any spelling or grammatical errors. When you are ready to make your initial post, click on the "Reply". Then copy/paste the text into the message field, and click "Post Reply."
To respond to a peer, click “Reply” beneath her or his post and continue as with an initial post.
Evaluation This discussion will be graded using a rubric. Please review this rubric prior to beginning your work. View the rubric by clicking on the gear icon Image of gear icon at the top right side of this page or on the Course Rubrics page within the Start Here module. All discussions combined are worth 24% of your final course grade.
Class Mate # 1
SETH JAMES
MondayNov 13 at 4:50pm
Manage Discussion Entry
Step One
1. Write descriptions for three data querying requirements that could be answered from the data stored in a database represented by your ER diagram. Your classmates will provide answers based on the requirements. Answers to your three requests should contain at least one JOIN; an aggregation function ; a GROUP By clause; and a WHERE or HAVING clause.
· Show all customers that reside in 28460
· Show all customers that spent over $5,000.00 in calendar year 2017
· Show total customer count
2. Write descriptions for two modifications for data already in the database.
· Change the Last name of Rebecca Smith to “Jones”
· Change the email address for employee 170515000001
3. Write descriptions for two deletions for data already in the database.
· Delete invoice 2017061015310001
· Delete employee 170707000001
-SJ
Capture.JPG
C:\Users\Ernie\Desktop\Seth ER Diagram Capture.jpg
Classmate # 2
PAUL NOWAK
SundayNov 12 at 8:54pm
Manage Discussion Entry
1. What movies were released in 1993?
2. What movies has Mel Gibson directed and acted in?
3. How many movies are in .avi format?
1. Change the name of “Batman v Superman: Dawn of Justice” to “Seriously, Never Watch This Again.”
2. Change the cover art for “Seriously, Never Watch This Again” to PoopEmoji.gif
1. Delete person number 105
2. Delete all movies directed by Zach Snyder.
C:\Users\Ernie\Desktop\Paul ER Diagrame m6d1.jpg
Classmate # 3
JAMES BAIZE
SundayNov 12 at 11:57am
Manage Discussion Entry
For this discussion, I used a simplified version of the fire department database I posted earlier in this term. I apologize for making this so late. I was trying to make it too complicated. I finally had to strip a few things out to make it a bit easier.
Here is a copy of my ERD.
I will upload a copy of the diagram by itself.
Question 1:
1. List all the equipment issued to a Mickey Mouse
2. Find the total number of disciplinary actions taken against John Public
3. Show personnel who have been Fire Chief (ID# 201) at anytime past or present.
Question 2:
1. Change Donald Duck’s telephone number from 812-882-0882 to 812-886-0886
2. Change Daffy Duck’s rank from Fire Fighter (ID# 101) to Lieutenant (ID# 111).
Question 3:
1. Delete the rank named “Captain of Floor Mopping” ID# 1001.
2. Delete the equipment entry for “Flour Mopping Machine” (ID# 6201)
C:\Users\Ernie\Desktop\James DMS M6D1 ER Diagram.png