SlideShare a Scribd company logo
1 of 13
Database Concepts, assignment 1 Page 1
of 4
BIS 234, Semester 1, 2018
Database Concepts Assignment 1 Part B and Part C
Prepared By: Dr Jamal El-den, Craig Coley
Due date: Friday, Week 7
Value:
Part B 4% tables and advanced queries
Part C 10% covers all topics
Submission details:
• You already have Part 1 of this assignment. Part B and C are
below
• Please submit all 3 parts of the assignments together.
• For Internal and External students: submission is via
Learnline. Instructions on how to
submit the assignment is located under Assessments /
Guidelines.
Part B: Table and Advanced Queries
Please answer all four questions.
For Question 1 provide the following:
• The SQL statement (4 of the marks)
For Question 2 provide the following:
• The SQL statement (3 of the marks)
For each Question 3 and 4 you have to provide the following:
• The SQL statement (3 of the marks)
Database Concepts, assignment 1 Page 2
of 4
1. The following Gym application database for weight session
recording is as follows
Write and run SQL statements for the Occurrence_exercise
table.
OCCURENCE
OccurenceID Occ_ Date Occ_Place Occ_Start_Time
Occ_Finish_Time
OCCURRENCE_EXERCISE
OccExID ExerciseNo OccurenceID REP Attempt1 Attempt2
Attempt3 Condition
EXERCISE
ExerciseNo ExerciseDecription ExerciseType
Include constraints values for the Condition: Heavy, Medium,
Light
2. Write an SQL statement that will insert the data into
Occurrence_Exercise table only.
OCCURENCE
OccurrenceID Occ_ Date Occ_Place Occ_Start_Time
Occ_Finish_Time
0001 14 MAR 18 University Gym 16:00 16:30
0002 15 MAR 18 University Gym 16:30 17:00
0003 16 MAR 18 University Gym 16:10 17:20
0004 17 MAR 18 Home 7:00 8:00
0005 17 MAR 18 University Gym 17:00 18:00
OCCURRENCE_EXERCISE
OccExID ExerciseNo OccurrenceID REPS Attempt1
(kg)
Attempt2
(kg)
Attempt3
(kg)
Condition
9001 001A 001 8 15 15 15 Light
9002 002A 001 8 70 75 70 Medium
9003 003A 002 12 90 95 90 Heavy
9004 004A 003 12 200 200 200 Medium
9005 006A 003 8 110 110 115 Heavy
9006 005A 004 10 20 25 Medium
9007 001A 004 8 10 12 10 Medium
9008 002A 005 8 85 90 115 Heavy
Database Concepts, assignment 1 Page 3
of 4
EXERCISE
ExerciseNo ExerciseDecription 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
Definition of rep stands for repetition.
Each exercise attempt has the rep number as indicated in the
occurrence table.
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
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
Database Concepts, assignment 1 Page 4
of 4
Part C:
For the first four questions refer to the Library Database
For question 5 refer to CDU Customer invoice Database
Please answer all five questions.
For each question you have to provide the following:
• The SQL statement (3 of the marks) except for question 4 (4
of the marks)
Using 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
• A branch may have a null value
• 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
5. Devise a delete query, which will eliminate duplicates for
columns customer id,
customer last name, customer first name, Invoice date, Invoice
No.
Ensure the query removes all duplicate data.
Overall grade
SQL Code/ tables/printout
Correct code
Description
Correct answers
· All attribute
· Criteria
· Correct syntax
· Most answers are correct
· All attribute
· Criteria
· Correct syntax
· Most answers are correct
· Some things overlooked
· All attribute
· Criteria
· Correct syntax
· Most answers correct
· Some things overlooked
· Concepts understood
· Some answers incorrect or missing
· Some problems
· Incorrect answers
· May have misunderstood the question
Excellent
Well done
Very good
OK
Need to review
HD
D
C
P
F
Some things to look out for
· Correct attributes given
· Correct use of Operators
· Linkages
· Capitals used for SELECT, FROM, WHERE, GROUP BY,
HAVING, ORDER BY, AND, OR
· Tables
· Linkage
· Correct concept in undertaking the questions
· And more
· Correct output (indicated in your document)
Note Question 4
· The mark is based on whether the question is answered
correctly.
· Complexity of the query e.g. a query that goes beyond the
content will gain a high grade where as a single table query
with no condition will gain less than a pass.
· Correct Syntax
· See also some things to look out for.
Database Concepts Assignment 1 Part A
Due date: Friday, Week 7
Value: 6%
Submission details:
For Internal and External students: submission is via Learnline.
Instructions on how to submit the assignment is located under
Assessments / Guidelines.
.
Part A: Single and multiple table queries
Please answer all 6 questions.
For five questions you have to provide the following
· SQL statement (3 of the marks)
For question 4 you have to provide the following:
· Written question, SQL statement to answer the question (3 of
the 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 until E; include last name beginning with Q as well as Z
also.
4. Create your own question based on the library Database and
with a SQL Statement to answer this.
5. 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.
6. Find the number of loans, which have been made from each
branch?
· Note all branches need to be included even those with no loans
Page 1 of 1
Overall grade B and C
SQL Code/ tables/printout
Correct code
Description
Correct answers
· All attribute
· Criteria
· Correct syntax
· Most answers are correct
· All attribute
· Criteria
· Correct syntax
· Most answers are correct
· Some things overlooked
· All attribute
· Criteria
· Correct syntax
· Most answers correct
· Some things overlooked
· Concepts understood
· Some answers incorrect or missing
· Some problems
· Incorrect answers
· May have misunderstood the question
Excellent
Well done
Very good
OK
Need to review
HD
D
C
P
F
Some things to look out for
Part b 1,2
· Correct attributes given
· Correct use of commands
· Linkage
· Capitals used for command and Attribute type e.g. CREATE
TABLE
· Correct concept in undertaking the questions
Part b 3,4 and C
· Correct attributes given
· Correct use of Operators
· Linkages
· Capitals used for SELECT, FROM, WHERE, GROUP BY,
HAVING, ORDER BY, AND, OR
· Tables
· Linkage
· Correct concept in undertaking the questions
· And more
· Correct output (indicated in your document)

More Related Content

Similar to DatabaseConcepts,assignment1 Page1of4BIS 234, S.docx

Accuplacer orientation rev 3 28 12
Accuplacer orientation rev 3 28 12Accuplacer orientation rev 3 28 12
Accuplacer orientation rev 3 28 12dpsandoval
 
ebookggj higuigyfhuuhfffihgffuuytrfhhffhhg
ebookggj higuigyfhuuhfffihgffuuytrfhhffhhgebookggj higuigyfhuuhfffihgffuuytrfhhffhhg
ebookggj higuigyfhuuhfffihgffuuytrfhhffhhgMallepallyChakravard
 
Slides
SlidesSlides
Slidespaxxx
 
Clerical abilities (5106)
Clerical abilities (5106)Clerical abilities (5106)
Clerical abilities (5106)Benilda Lanuza
 
SAGE interview questions for Asst. Professor
SAGE interview questions for Asst. ProfessorSAGE interview questions for Asst. Professor
SAGE interview questions for Asst. Professorkiranrajat
 
Part 1 SQLDatabase workScenarioDevelopment of a relationa.docx
Part 1 SQLDatabase workScenarioDevelopment of a relationa.docxPart 1 SQLDatabase workScenarioDevelopment of a relationa.docx
Part 1 SQLDatabase workScenarioDevelopment of a relationa.docxMARRY7
 
Top 10 tips for epsos numerical reasoning cbt
Top 10 tips for epsos numerical reasoning cbtTop 10 tips for epsos numerical reasoning cbt
Top 10 tips for epsos numerical reasoning cbtetlink
 
normalization of database management ppt
normalization of database management pptnormalization of database management ppt
normalization of database management pptRabiaKabir
 
Some notes - My company is LSS warehouse logistic company.docx
Some notes - My company is LSS warehouse logistic company.docxSome notes - My company is LSS warehouse logistic company.docx
Some notes - My company is LSS warehouse logistic company.docxwhitneyleman54422
 
Assignment 05MA260 Statistical Analysis IDirections Be sure t.docx
Assignment 05MA260 Statistical Analysis IDirections Be sure t.docxAssignment 05MA260 Statistical Analysis IDirections Be sure t.docx
Assignment 05MA260 Statistical Analysis IDirections Be sure t.docxdavezstarr61655
 
Common Core Warm-Ups.pdf
Common Core Warm-Ups.pdfCommon Core Warm-Ups.pdf
Common Core Warm-Ups.pdfMarjoCeloso1
 
Charles WilliamsCS362Unit 3 Discussion BoardStructured Query Langu.docx
Charles WilliamsCS362Unit 3 Discussion BoardStructured Query Langu.docxCharles WilliamsCS362Unit 3 Discussion BoardStructured Query Langu.docx
Charles WilliamsCS362Unit 3 Discussion BoardStructured Query Langu.docxchristinemaritza
 
9th Comp Ch 1 LQ.pdf
9th Comp Ch 1 LQ.pdf9th Comp Ch 1 LQ.pdf
9th Comp Ch 1 LQ.pdfNaeem Mughal
 
Assessment Cover page Page 1 of 1 Version 1.0 0518 .docx
Assessment Cover page     Page 1 of 1 Version 1.0 0518  .docxAssessment Cover page     Page 1 of 1 Version 1.0 0518  .docx
Assessment Cover page Page 1 of 1 Version 1.0 0518 .docxgalerussel59292
 
Assessment Cover page Page 1 of 1 Version 1.0 0518 .docx
Assessment Cover page     Page 1 of 1 Version 1.0 0518  .docxAssessment Cover page     Page 1 of 1 Version 1.0 0518  .docx
Assessment Cover page Page 1 of 1 Version 1.0 0518 .docxfestockton
 
Structured Query Language for Data Management 2 Sructu.docx
Structured Query Language for Data Management      2 Sructu.docxStructured Query Language for Data Management      2 Sructu.docx
Structured Query Language for Data Management 2 Sructu.docxjohniemcm5zt
 

Similar to DatabaseConcepts,assignment1 Page1of4BIS 234, S.docx (18)

Accuplacer orientation rev 3 28 12
Accuplacer orientation rev 3 28 12Accuplacer orientation rev 3 28 12
Accuplacer orientation rev 3 28 12
 
ebookggj higuigyfhuuhfffihgffuuytrfhhffhhg
ebookggj higuigyfhuuhfffihgffuuytrfhhffhhgebookggj higuigyfhuuhfffihgffuuytrfhhffhhg
ebookggj higuigyfhuuhfffihgffuuytrfhhffhhg
 
Slides
SlidesSlides
Slides
 
Clerical abilities (5106)
Clerical abilities (5106)Clerical abilities (5106)
Clerical abilities (5106)
 
SAGE interview questions for Asst. Professor
SAGE interview questions for Asst. ProfessorSAGE interview questions for Asst. Professor
SAGE interview questions for Asst. Professor
 
Part 1 SQLDatabase workScenarioDevelopment of a relationa.docx
Part 1 SQLDatabase workScenarioDevelopment of a relationa.docxPart 1 SQLDatabase workScenarioDevelopment of a relationa.docx
Part 1 SQLDatabase workScenarioDevelopment of a relationa.docx
 
Top 10 tips for epsos numerical reasoning cbt
Top 10 tips for epsos numerical reasoning cbtTop 10 tips for epsos numerical reasoning cbt
Top 10 tips for epsos numerical reasoning cbt
 
normalization of database management ppt
normalization of database management pptnormalization of database management ppt
normalization of database management ppt
 
Some notes - My company is LSS warehouse logistic company.docx
Some notes - My company is LSS warehouse logistic company.docxSome notes - My company is LSS warehouse logistic company.docx
Some notes - My company is LSS warehouse logistic company.docx
 
Assignment 05MA260 Statistical Analysis IDirections Be sure t.docx
Assignment 05MA260 Statistical Analysis IDirections Be sure t.docxAssignment 05MA260 Statistical Analysis IDirections Be sure t.docx
Assignment 05MA260 Statistical Analysis IDirections Be sure t.docx
 
Common Core Warm-Ups.pdf
Common Core Warm-Ups.pdfCommon Core Warm-Ups.pdf
Common Core Warm-Ups.pdf
 
Charles WilliamsCS362Unit 3 Discussion BoardStructured Query Langu.docx
Charles WilliamsCS362Unit 3 Discussion BoardStructured Query Langu.docxCharles WilliamsCS362Unit 3 Discussion BoardStructured Query Langu.docx
Charles WilliamsCS362Unit 3 Discussion BoardStructured Query Langu.docx
 
9th Comp Ch 1 LQ.pdf
9th Comp Ch 1 LQ.pdf9th Comp Ch 1 LQ.pdf
9th Comp Ch 1 LQ.pdf
 
Assessment Cover page Page 1 of 1 Version 1.0 0518 .docx
Assessment Cover page     Page 1 of 1 Version 1.0 0518  .docxAssessment Cover page     Page 1 of 1 Version 1.0 0518  .docx
Assessment Cover page Page 1 of 1 Version 1.0 0518 .docx
 
Assessment Cover page Page 1 of 1 Version 1.0 0518 .docx
Assessment Cover page     Page 1 of 1 Version 1.0 0518  .docxAssessment Cover page     Page 1 of 1 Version 1.0 0518  .docx
Assessment Cover page Page 1 of 1 Version 1.0 0518 .docx
 
Tech fix
Tech fixTech fix
Tech fix
 
Tech fix
Tech fixTech fix
Tech fix
 
Structured Query Language for Data Management 2 Sructu.docx
Structured Query Language for Data Management      2 Sructu.docxStructured Query Language for Data Management      2 Sructu.docx
Structured Query Language for Data Management 2 Sructu.docx
 

More from simonithomas47935

Hours, A. (2014). Reading Fairy Tales and Playing A Way of Treati.docx
Hours, A. (2014). Reading Fairy Tales and Playing A Way of Treati.docxHours, A. (2014). Reading Fairy Tales and Playing A Way of Treati.docx
Hours, A. (2014). Reading Fairy Tales and Playing A Way of Treati.docxsimonithomas47935
 
How are authentication and authorization alike and how are the.docx
How are authentication and authorization alike and how are the.docxHow are authentication and authorization alike and how are the.docx
How are authentication and authorization alike and how are the.docxsimonithomas47935
 
How are self-esteem and self-concept different What is the or.docx
How are self-esteem and self-concept different What is the or.docxHow are self-esteem and self-concept different What is the or.docx
How are self-esteem and self-concept different What is the or.docxsimonithomas47935
 
How are morality and religion similar and how are they different.docx
How are morality and religion similar and how are they different.docxHow are morality and religion similar and how are they different.docx
How are morality and religion similar and how are they different.docxsimonithomas47935
 
How are financial statements used to evaluate business activities.docx
How are financial statements used to evaluate business activities.docxHow are financial statements used to evaluate business activities.docx
How are financial statements used to evaluate business activities.docxsimonithomas47935
 
How are Japanese and Chinese Americans similar How are they differe.docx
How are Japanese and Chinese Americans similar How are they differe.docxHow are Japanese and Chinese Americans similar How are they differe.docx
How are Japanese and Chinese Americans similar How are they differe.docxsimonithomas47935
 
Hot Spot PolicingPlace can be an important aspect of crime and.docx
Hot Spot PolicingPlace can be an important aspect of crime and.docxHot Spot PolicingPlace can be an important aspect of crime and.docx
Hot Spot PolicingPlace can be an important aspect of crime and.docxsimonithomas47935
 
HOSP3075 Brand Analysis Paper 1This is the first of three assignme.docx
HOSP3075 Brand Analysis Paper 1This is the first of three assignme.docxHOSP3075 Brand Analysis Paper 1This is the first of three assignme.docx
HOSP3075 Brand Analysis Paper 1This is the first of three assignme.docxsimonithomas47935
 
Hou, J., Li, Y., Yu, J. & Shi, W. (2020). A Survey on Digital Fo.docx
Hou, J., Li, Y., Yu, J. & Shi, W. (2020). A Survey on Digital Fo.docxHou, J., Li, Y., Yu, J. & Shi, W. (2020). A Survey on Digital Fo.docx
Hou, J., Li, Y., Yu, J. & Shi, W. (2020). A Survey on Digital Fo.docxsimonithomas47935
 
How (Not) to be Secular by James K.A. SmithSecular (1)—the ea.docx
How (Not) to be Secular by James K.A. SmithSecular (1)—the ea.docxHow (Not) to be Secular by James K.A. SmithSecular (1)—the ea.docx
How (Not) to be Secular by James K.A. SmithSecular (1)—the ea.docxsimonithomas47935
 
Hopefully, you enjoyed this class on Digital Media and Society.Q.docx
Hopefully, you enjoyed this class on Digital Media and Society.Q.docxHopefully, you enjoyed this class on Digital Media and Society.Q.docx
Hopefully, you enjoyed this class on Digital Media and Society.Q.docxsimonithomas47935
 
hoose (1) one childhood experience from the list provided below..docx
hoose (1) one childhood experience from the list provided below..docxhoose (1) one childhood experience from the list provided below..docx
hoose (1) one childhood experience from the list provided below..docxsimonithomas47935
 
honesty, hard work, caring, excellence HIS 1110 Dr. .docx
honesty, hard work, caring, excellence  HIS 1110      Dr. .docxhonesty, hard work, caring, excellence  HIS 1110      Dr. .docx
honesty, hard work, caring, excellence HIS 1110 Dr. .docxsimonithomas47935
 
hoose one of the four following visualsImage courtesy o.docx
hoose one of the four following visualsImage courtesy o.docxhoose one of the four following visualsImage courtesy o.docx
hoose one of the four following visualsImage courtesy o.docxsimonithomas47935
 
HomeworkChoose a site used by the public such as a supermark.docx
HomeworkChoose a site used by the public such as a supermark.docxHomeworkChoose a site used by the public such as a supermark.docx
HomeworkChoose a site used by the public such as a supermark.docxsimonithomas47935
 
Homework 2 Please answer the following questions in small paragraph.docx
Homework 2 Please answer the following questions in small paragraph.docxHomework 2 Please answer the following questions in small paragraph.docx
Homework 2 Please answer the following questions in small paragraph.docxsimonithomas47935
 
HomeNotificationsMy CommunityBBA 2010-16J-5A21-S1, Introductio.docx
HomeNotificationsMy CommunityBBA 2010-16J-5A21-S1, Introductio.docxHomeNotificationsMy CommunityBBA 2010-16J-5A21-S1, Introductio.docx
HomeNotificationsMy CommunityBBA 2010-16J-5A21-S1, Introductio.docxsimonithomas47935
 
HomeAnnouncementsSyllabusDiscussionsQuizzesGra.docx
HomeAnnouncementsSyllabusDiscussionsQuizzesGra.docxHomeAnnouncementsSyllabusDiscussionsQuizzesGra.docx
HomeAnnouncementsSyllabusDiscussionsQuizzesGra.docxsimonithomas47935
 
Homeless The Motel Kids of Orange CountyWrite a 1-2 page pa.docx
Homeless The Motel Kids of Orange CountyWrite a 1-2 page pa.docxHomeless The Motel Kids of Orange CountyWrite a 1-2 page pa.docx
Homeless The Motel Kids of Orange CountyWrite a 1-2 page pa.docxsimonithomas47935
 
Home work 8 Date 042220201. what are the different between.docx
Home work  8 Date 042220201. what are the  different between.docxHome work  8 Date 042220201. what are the  different between.docx
Home work 8 Date 042220201. what are the different between.docxsimonithomas47935
 

More from simonithomas47935 (20)

Hours, A. (2014). Reading Fairy Tales and Playing A Way of Treati.docx
Hours, A. (2014). Reading Fairy Tales and Playing A Way of Treati.docxHours, A. (2014). Reading Fairy Tales and Playing A Way of Treati.docx
Hours, A. (2014). Reading Fairy Tales and Playing A Way of Treati.docx
 
How are authentication and authorization alike and how are the.docx
How are authentication and authorization alike and how are the.docxHow are authentication and authorization alike and how are the.docx
How are authentication and authorization alike and how are the.docx
 
How are self-esteem and self-concept different What is the or.docx
How are self-esteem and self-concept different What is the or.docxHow are self-esteem and self-concept different What is the or.docx
How are self-esteem and self-concept different What is the or.docx
 
How are morality and religion similar and how are they different.docx
How are morality and religion similar and how are they different.docxHow are morality and religion similar and how are they different.docx
How are morality and religion similar and how are they different.docx
 
How are financial statements used to evaluate business activities.docx
How are financial statements used to evaluate business activities.docxHow are financial statements used to evaluate business activities.docx
How are financial statements used to evaluate business activities.docx
 
How are Japanese and Chinese Americans similar How are they differe.docx
How are Japanese and Chinese Americans similar How are they differe.docxHow are Japanese and Chinese Americans similar How are they differe.docx
How are Japanese and Chinese Americans similar How are they differe.docx
 
Hot Spot PolicingPlace can be an important aspect of crime and.docx
Hot Spot PolicingPlace can be an important aspect of crime and.docxHot Spot PolicingPlace can be an important aspect of crime and.docx
Hot Spot PolicingPlace can be an important aspect of crime and.docx
 
HOSP3075 Brand Analysis Paper 1This is the first of three assignme.docx
HOSP3075 Brand Analysis Paper 1This is the first of three assignme.docxHOSP3075 Brand Analysis Paper 1This is the first of three assignme.docx
HOSP3075 Brand Analysis Paper 1This is the first of three assignme.docx
 
Hou, J., Li, Y., Yu, J. & Shi, W. (2020). A Survey on Digital Fo.docx
Hou, J., Li, Y., Yu, J. & Shi, W. (2020). A Survey on Digital Fo.docxHou, J., Li, Y., Yu, J. & Shi, W. (2020). A Survey on Digital Fo.docx
Hou, J., Li, Y., Yu, J. & Shi, W. (2020). A Survey on Digital Fo.docx
 
How (Not) to be Secular by James K.A. SmithSecular (1)—the ea.docx
How (Not) to be Secular by James K.A. SmithSecular (1)—the ea.docxHow (Not) to be Secular by James K.A. SmithSecular (1)—the ea.docx
How (Not) to be Secular by James K.A. SmithSecular (1)—the ea.docx
 
Hopefully, you enjoyed this class on Digital Media and Society.Q.docx
Hopefully, you enjoyed this class on Digital Media and Society.Q.docxHopefully, you enjoyed this class on Digital Media and Society.Q.docx
Hopefully, you enjoyed this class on Digital Media and Society.Q.docx
 
hoose (1) one childhood experience from the list provided below..docx
hoose (1) one childhood experience from the list provided below..docxhoose (1) one childhood experience from the list provided below..docx
hoose (1) one childhood experience from the list provided below..docx
 
honesty, hard work, caring, excellence HIS 1110 Dr. .docx
honesty, hard work, caring, excellence  HIS 1110      Dr. .docxhonesty, hard work, caring, excellence  HIS 1110      Dr. .docx
honesty, hard work, caring, excellence HIS 1110 Dr. .docx
 
hoose one of the four following visualsImage courtesy o.docx
hoose one of the four following visualsImage courtesy o.docxhoose one of the four following visualsImage courtesy o.docx
hoose one of the four following visualsImage courtesy o.docx
 
HomeworkChoose a site used by the public such as a supermark.docx
HomeworkChoose a site used by the public such as a supermark.docxHomeworkChoose a site used by the public such as a supermark.docx
HomeworkChoose a site used by the public such as a supermark.docx
 
Homework 2 Please answer the following questions in small paragraph.docx
Homework 2 Please answer the following questions in small paragraph.docxHomework 2 Please answer the following questions in small paragraph.docx
Homework 2 Please answer the following questions in small paragraph.docx
 
HomeNotificationsMy CommunityBBA 2010-16J-5A21-S1, Introductio.docx
HomeNotificationsMy CommunityBBA 2010-16J-5A21-S1, Introductio.docxHomeNotificationsMy CommunityBBA 2010-16J-5A21-S1, Introductio.docx
HomeNotificationsMy CommunityBBA 2010-16J-5A21-S1, Introductio.docx
 
HomeAnnouncementsSyllabusDiscussionsQuizzesGra.docx
HomeAnnouncementsSyllabusDiscussionsQuizzesGra.docxHomeAnnouncementsSyllabusDiscussionsQuizzesGra.docx
HomeAnnouncementsSyllabusDiscussionsQuizzesGra.docx
 
Homeless The Motel Kids of Orange CountyWrite a 1-2 page pa.docx
Homeless The Motel Kids of Orange CountyWrite a 1-2 page pa.docxHomeless The Motel Kids of Orange CountyWrite a 1-2 page pa.docx
Homeless The Motel Kids of Orange CountyWrite a 1-2 page pa.docx
 
Home work 8 Date 042220201. what are the different between.docx
Home work  8 Date 042220201. what are the  different between.docxHome work  8 Date 042220201. what are the  different between.docx
Home work 8 Date 042220201. what are the different between.docx
 

Recently uploaded

Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 

Recently uploaded (20)

INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 

DatabaseConcepts,assignment1 Page1of4BIS 234, S.docx

  • 1. Database Concepts, assignment 1 Page 1 of 4 BIS 234, Semester 1, 2018 Database Concepts Assignment 1 Part B and Part C Prepared By: Dr Jamal El-den, Craig Coley Due date: Friday, Week 7 Value: Part B 4% tables and advanced queries Part C 10% covers all topics Submission details: • You already have Part 1 of this assignment. Part B and C are below • Please submit all 3 parts of the assignments together. • For Internal and External students: submission is via Learnline. Instructions on how to submit the assignment is located under Assessments / Guidelines. Part B: Table and Advanced Queries
  • 2. Please answer all four questions. For Question 1 provide the following: • The SQL statement (4 of the marks) For Question 2 provide the following: • The SQL statement (3 of the marks) For each Question 3 and 4 you have to provide the following: • The SQL statement (3 of the marks) Database Concepts, assignment 1 Page 2 of 4 1. The following Gym application database for weight session recording is as follows Write and run SQL statements for the Occurrence_exercise table. OCCURENCE OccurenceID Occ_ Date Occ_Place Occ_Start_Time Occ_Finish_Time
  • 3. OCCURRENCE_EXERCISE OccExID ExerciseNo OccurenceID REP Attempt1 Attempt2 Attempt3 Condition EXERCISE ExerciseNo ExerciseDecription ExerciseType Include constraints values for the Condition: Heavy, Medium, Light 2. Write an SQL statement that will insert the data into Occurrence_Exercise table only. OCCURENCE OccurrenceID Occ_ Date Occ_Place Occ_Start_Time Occ_Finish_Time 0001 14 MAR 18 University Gym 16:00 16:30 0002 15 MAR 18 University Gym 16:30 17:00 0003 16 MAR 18 University Gym 16:10 17:20 0004 17 MAR 18 Home 7:00 8:00 0005 17 MAR 18 University Gym 17:00 18:00 OCCURRENCE_EXERCISE
  • 4. OccExID ExerciseNo OccurrenceID REPS Attempt1 (kg) Attempt2 (kg) Attempt3 (kg) Condition 9001 001A 001 8 15 15 15 Light 9002 002A 001 8 70 75 70 Medium 9003 003A 002 12 90 95 90 Heavy 9004 004A 003 12 200 200 200 Medium 9005 006A 003 8 110 110 115 Heavy 9006 005A 004 10 20 25 Medium 9007 001A 004 8 10 12 10 Medium 9008 002A 005 8 85 90 115 Heavy Database Concepts, assignment 1 Page 3 of 4 EXERCISE ExerciseNo ExerciseDecription ExerciseType
  • 5. 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 Definition of rep stands for repetition. Each exercise attempt has the rep number as indicated in the occurrence table. 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
  • 6. 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 Database Concepts, assignment 1 Page 4 of 4 Part C: For the first four questions refer to the Library Database For question 5 refer to CDU Customer invoice Database Please answer all five questions. For each question you have to provide the following: • The SQL statement (3 of the marks) except for question 4 (4 of the marks) Using Library Database
  • 7. 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 • A branch may have a null value • 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 5. Devise a delete query, which will eliminate duplicates for columns customer id, customer last name, customer first name, Invoice date, Invoice No. Ensure the query removes all duplicate data.
  • 8. Overall grade SQL Code/ tables/printout Correct code Description Correct answers · All attribute · Criteria · Correct syntax · Most answers are correct · All attribute · Criteria · Correct syntax · Most answers are correct · Some things overlooked · All attribute · Criteria · Correct syntax · Most answers correct · Some things overlooked · Concepts understood · Some answers incorrect or missing · Some problems · Incorrect answers · May have misunderstood the question
  • 9. Excellent Well done Very good OK Need to review HD D C P F Some things to look out for · Correct attributes given · Correct use of Operators · Linkages · Capitals used for SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY, AND, OR · Tables · Linkage · Correct concept in undertaking the questions · And more · Correct output (indicated in your document) Note Question 4 · The mark is based on whether the question is answered correctly. · Complexity of the query e.g. a query that goes beyond the content will gain a high grade where as a single table query with no condition will gain less than a pass. · Correct Syntax · See also some things to look out for.
  • 10. Database Concepts Assignment 1 Part A Due date: Friday, Week 7 Value: 6% Submission details: For Internal and External students: submission is via Learnline. Instructions on how to submit the assignment is located under Assessments / Guidelines. . Part A: Single and multiple table queries Please answer all 6 questions. For five questions you have to provide the following · SQL statement (3 of the marks) For question 4 you have to provide the following: · Written question, SQL statement to answer the question (3 of the 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 until E; include last name beginning with Q as well as Z also. 4. Create your own question based on the library Database and with a SQL Statement to answer this.
  • 11. 5. 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. 6. Find the number of loans, which have been made from each branch? · Note all branches need to be included even those with no loans Page 1 of 1 Overall grade B and C SQL Code/ tables/printout Correct code Description Correct answers · All attribute · Criteria · Correct syntax · Most answers are correct · All attribute · Criteria · Correct syntax · Most answers are correct · Some things overlooked · All attribute · Criteria · Correct syntax · Most answers correct · Some things overlooked · Concepts understood · Some answers incorrect or missing
  • 12. · Some problems · Incorrect answers · May have misunderstood the question Excellent Well done Very good OK Need to review HD D C P F Some things to look out for Part b 1,2 · Correct attributes given · Correct use of commands · Linkage · Capitals used for command and Attribute type e.g. CREATE TABLE · Correct concept in undertaking the questions Part b 3,4 and C · Correct attributes given · Correct use of Operators · Linkages · Capitals used for SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY, AND, OR · Tables
  • 13. · Linkage · Correct concept in undertaking the questions · And more · Correct output (indicated in your document)