Assignment | Information Systems homework help

[ad_1]

  

HIT 234 Assignment 1

Submission Details:

For Internal and External students: submission is via Learnline. Instructions on how to submit the assignment is located under Assessments / Guidelines.

Please answer all questions.

Part A – Single and multiple table queries

Value: 6%

For the first five questions you have to provide your answer in the form of a SQL statement, with description before as necessary. For example:

1. Example Question: Select all columns from the `Customer` table

Example Answer:

— This answer will select out all the columns from the Customer table

SELECT * from Customer;

Questions 1 – 5:

Worth 3% of the total marks

1. List in ascending order the Last Names of all borrowers with Card Number less than 150.

2. What are the records of those loans between 3 June 2014 and 8 Mar 2018?

◦ The output should include the name of the cardholder, and title of the book

◦ List in ascending order by last name and first name

3. Find the total numbers of loans with last name beginning with D through E (including E); include last name beginning with Q as well as Z also.

4. Find all borrowers for a loan that have the Date-in before 15-March-15 and the Card number between 100 and 300 in Karama or Darwin.

5. Find the number of loans, which have been made from each branch?

◦ Note all branches need to be included even those with no loans

Question 6:

Worth 3% of the total marks

6. Create your own question based on the library database, and also provide a SQL Statement to answer your question.

Part B – Table and Advanced Queries

Value: 4%

The questions are broken into: Q1 (4 marks), Q2 (3 marks), Q3 and Q4 (3 marks). For all questions, provide the answer in the form of a SQL statement, with description before as necessary.

Questions

  

NOTES

 

Questions 1 and 2 require you to answer in the form of a   SQL statement to create a table and insert data into it. The question and   answer is only about the statements to create and put data into the   `Occurrence_Exercise` table, however it is recommended that you create the   statements to create and insert data into all 3 tables, so that you can test   that your statements are correct. Please only provide in your answer the SQL   statement for the `Occurrence_Exercise` table.

 

To understand the terminology:

A   rep is a number of times you do an attempted weight.

A   set is an attempt and in this case, there are 3 attempts (attempt 1,   attempt 2, attempt 3).

An   attempt contains the weight.

So to understand the weight you would lift for a single   exercise in the Exercise attempt table you would need to consider the rep   multiplied by attempts by the weight. So for a single attempt:

e.g. for 9001

rep multiplied by attempts by the weight

8 reps x 3 attempts x 15kg = 360 total kg’s lifted

1. The following Gym application database for weight session recording is as follows. Write and run SQL statements for creating the Occurrence_Exercise table.

◦ Include constraint values for the Condition Column: Heavy, Medium, Light

2. Write an SQL statement that will insert the data into Occurrence_Exercise table only.

◦ Definition of rep stands for repetition.

◦ Each exercise attempt has the rep number as indicated in the occurrence table.

Occurrence Table

  

OccurrenceID

Occ_Date

Occ_Place

Occ_Start_Time

Occ_Finish_Time

 

1

14/03/18

University_Gym

16:00:00

16:30:00

 

2

15/03/18

University_Gym

16:30:00

17:00:00

 

3

16/03/18

University_Gym

16:10:00

17:20:00

 

4

17/03/18

Home

07:00:00

08:00:00

 

5

17/03/18

University_Gym

17:00:00

18:00:00

Occurrence_Exercise Table

  

OccExID

ExerciseNo

OccurrenceID

Rep

Attempt1

Attempt2

Attempt3

Condition

 

9001

001A

1

8

15

15

15

Light

 

9002

002A

1

8

70

75

70

Medium

 

9003

003A

2

12

90

95

90

Heavy

 

9004

004A

3

12

200

200

200

Medium

 

9005

006A

3

8

110

110

115

Heavy

 

9006

005A

4

10

20

25

Medium

 

9007

001A

4

8

10

12

10

Medium

 

9008

002A

5

8

85

90

115

Heavy

Exercise Table

  

ExerciseNo

ExerciseDescription

ExerciseType

 

001A

Situps

Abs

 

002A

Bench Press

Chest

 

003A

Dead Lifts

Back

 

004A

Leg Press

Legs

 

005A

Seated Shoulder Press

Shoulders

 

006A

Squats

Legs

 

007A

Lat pull downs

Lats

Create the following queries:

3. Find the exercise which contains the maximum total weight lifted

◦ Show: Exercise, Maximum weight

◦ Ensure you show captions for each of the columns

◦ Hint: you would need to consider the number of times the weight is lifted and weight e.g. rep multiplied by attempt multiplied by the weight

4. Find the exercise that the user was not able to complete 3 attempts in, or the exercise that the user has not attempted.

◦ Show appropriate columns

◦ List in ascending order exercise type

◦ Do not show repeated names

◦ Ensure you show captions for each of the columns

Part C – All Topics

Value: 10%

For the first four questions refer to the Library Database. For question 5 refer to CDU Customer Invoice Database.

The questions are broken into: Q1-4 (6 marks) and Q5 (4 marks).

For all questions, provide the answer in the form of a SQL statement, with description before as necessary.

Questions Using the Library Database

1. What are the 5 most popular books?

◦ Show ASBN, Title.

◦ HINT: To limit results use ROWNUM.

2. Which branches currently have no loans out?

◦ Show all branch names.

◦ List in ascending order by branch.

3. Find the longest time a book has been loaned out for each branch

◦ Show only branch name and number of days.

◦ List in ascending order by branch name.

◦ Show all branches, even if there are no loaned out books. Therefore, a branch may have null value for the longest loaded out book.

◦ Format the number of days to one decimal place.

4. Find the borrower that has returned a book on the dated 16 December 2010 and 8 May 2012

◦ Show two different methods.

Question Using the CDU Customer Invoice Database

5. Devise a delete query, which will eliminate duplicates for customer columns `ID`, `CustomerLastName`, `CustomerFirstName` and invoice columns `Invoice_Date` and `Invoice_No`.

◦ Ensure the query removes all duplicate a data.

Calculate the price
Make an order in advance and get the best price
Pages (550 words)
$0.00
*Price with a welcome 15% discount applied.
Pro tip: If you want to save more money and pay the lowest price, you need to set a more extended deadline.
We know how difficult it is to be a student these days. That's why our prices are one of the most affordable on the market, and there are no hidden fees.

Instead, we offer bonuses, discounts, and free services to make your experience outstanding.
How it works
Receive a 100% original paper that will pass Turnitin from a top essay writing service
step 1
Upload your instructions
Fill out the order form and provide paper details. You can even attach screenshots or add additional instructions later. If something is not clear or missing, the writer will contact you for clarification.
Pro service tips
How to get the most out of your experience with Australia Assessments
One writer throughout the entire course
If you like the writer, you can hire them again. Just copy & paste their ID on the order form ("Preferred Writer's ID" field). This way, your vocabulary will be uniform, and the writer will be aware of your needs.
The same paper from different writers
You can order essay or any other work from two different writers to choose the best one or give another version to a friend. This can be done through the add-on "Same paper from another writer."
Copy of sources used by the writer
Our college essay writers work with ScienceDirect and other databases. They can send you articles or materials used in PDF or through screenshots. Just tick the "Copy of sources" field on the order form.
Testimonials
See why 20k+ students have chosen us as their sole writing assistance provider
Check out the latest reviews and opinions submitted by real customers worldwide and make an informed decision.
Other
Good content. Check APA cover page format on the student paper here https://owl.purdue.edu/owl/research_and_citation/apa_style/apa_formatting_and_style_guide/apa_sample_paper.html
Customer 462457, March 29th, 2022
Statistics
super professional
Customer 462485, May 17th, 2022
SEO
Very nice content. I am glad you took the corrections to heart and made the changes. Commendable work.
Customer 463679, February 22nd, 2023
Military
excellent work
Customer 456821, June 26th, 2022
Business and administrative studies
I had to make some updates but overall the paper was great. Will need to use this writer again for the next part.
Customer 453721, October 29th, 2022
Business and administrative studies
Outstanding work!!
Customer 460073, August 4th, 2022
Public Administration
N/a
Customer 453751, June 28th, 2020
Business Studies
I got a B on the paper. Which is okay. But would of preferred an A paper since I paid a bit more for better writing.
Customer 454445, June 2nd, 2020
Healthcare & Medical
Excellent work.
Customer 452441, May 16th, 2022
SEO
Well written.
Customer 463869, March 30th, 2023
Psychology
This week's paper was written really well; however, I could immediately ascertain that a different writer had written this paper because there was some minor formatting errors that needed to be corrected. Also, I had to re-write a couple of sentences, but it was not anything major to request a revision for. Overall, the paper was good, but I would like to see consistency in the papers regardless of different writers.
Customer 452455, April 29th, 2023
Human Resources Management (HRM)
Good work.
Customer 463125, July 4th, 2022
11,595
Customer reviews in total
96%
Current satisfaction rate
3 pages
Average paper length
37%
Customers referred by a friend
OUR GIFT TO YOU
15% OFF your first order
Use a coupon FIRST15 and enjoy expert help with any task at the most affordable price.
Claim my 15% OFF Order in Chat