

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


By now you should have figured out how to normalize a database both from in class and on your own. Download and save the Harkins.mdb file from the ITMG 100 Course Website (located under the access hyperlink from the schedule page). Upon download—proceed to create the necessary relationships as to normalize the database (HINT: Remember that a primary key is in bold for each table and that a primary key can also be listed in another table which is then known as a foreign key)
Now that we have fixed the Harkins database the upper management is very interested in the learning about the information lost as it needs to make many important decisions. Some decisions are about what theater zones are producing best, others are about what types of movies are doing better than others. Since you have been exposed to access you know that these answers can be obtained by running queries of the database. Let’s start with some. We will start with an easy query for review-it is also referred to as either a simple or select query. Go back to the query option in your access database. Again click on query wizard and select movie_type so that it appears on the right hand side. This time notice that you can select from other tables. Once are done selecting movie_type search for the sales table and select the item sales so that it appears on the right. Upon completion hit next and then notice you have two options in the dialog box—one that allows you to select detailed or summary reports. Click on the summary selection and then hit the summary options box. A new screen will come up asking you what type of summary options you want—select sum and then hit OK. The next screen will ask you to name your query and ask how you want to open it—just select the option that says to run the query upon hitting Finish. If successful you will a listing of all of the different movie types and the sum of their sales. Which movie typed produced the most sales? Sorting Query Fields Lets move to one more little advanced step—learning to sort within a query. Right Click on the movie type query and select the sort ascending option A-Z. Save your results as Movie_Query_1.
Often times there are cases when you wish to know an answer based on specific criteria. For example, say you want to know the sum of sales for a particular week. This particular exercise will introduce you how to create this type of query—first as a hard-coded entry. Then the second part will show how you can create a dialog box to come up to entertain many different types of questions (i.e. Instead of always showing week 1, the person will be able to enter in a specific week of their choosing. This time we are going to create a query in design view and not use the query wizard. To accomplish this task complete the following tasks. QUESTION ASKED “WHAT WHERE THE TOTAL SUM OF TICKET SALES FOR WEEK 3?”
This was great that you were able to find the answer for week 3. But what if you needed the answers for other weeks? Do you really want to recreate new queries for each week? Probably not, and why should you when you don’t have to. All you need to do is one little step listed below. Instead of having a number 3 in your criteria box lets change it to the following syntax: [which week?]
When you have completed that task, hit the exclamation mark and run the query again. This time you should get a dialog box that asks you a question ‘which week?’ and after your response produces an answer. Execute the query and write down your answers to the different weeks listed below. When finished save your query as movie_query3. Week 2 ___________ Week 7 ___________
There comes a time when you wish to sort on one specific field and on another specific field. For example if we wish to determine what the sales of a particular movie in a particular zone was. Again this time we are going to create a query in design view and not use the query wizard. To accomplish this task complete the following tasks. QUESTION ASKED “WHAT WHERE THE TOTAL SUM OF TICKET SALES FOR THE MOVIE ‘HOSTAGE’ IN THEATER ZONE 3?”
There are also times where you wish to sort on a condition where the answer can be determined by an OR condition. For example, perhaps you wish to know the answer to which movies had either the highest or the lowest sales for a given week. In this example will be wanting to find the answer to this specific question “What where the movies that had sales less than100,000 and more than 1,000,000 in week 3”.Again we will engage in creating a query in design view. To accomplish this task complete the following tasks:
Access like all the other office products integrate very well with each other. In this example we wish to take our query results and export them to Excel so that we can make a chart of the answer. With the query still open (after being executed) select Tools on the top bar, and then select Office Links (hint you may have to select the double arrows to expand menu options). You should notice that you have some options to merge the data with work, publish it with word, or analyze it with Excel. Select the last option. If successful Excel will open up and you can then make a chart out of the data.
Save your file as your_last_name_harkins_a2.mdb and email that file to me at [email protected].