Loading...

Messages

Proposals

Stuck in your homework and missing deadline? Get urgent help in $10/Page with 24 hours deadline

Get Urgent Writing Help In Your Essays, Assignments, Homeworks, Dissertation, Thesis Or Coursework & Achieve A+ Grades.

Privacy Guaranteed - 100% Plagiarism Free Writing - Free Turnitin Report - Professional And Experienced Writers - 24/7 Online Support

Write an sql statement to count the number of pets

07/12/2021 Client: muhammad11 Deadline: 2 Day

RELATIONAL DATABASE DESIGN

You have been tasked to turn these data into a relational database. You will need to build the database and write a report about what you did. You only need to submit the report. It should have the following sections:

a. Introduction – Introduce the business requirements and describe one business rule and one use case you can identify from the scenario given above.

10 marks
b. ER Diagram - Identify the entities and relationships in the scenario given above and draw an ER diagram showing the entities, attributes, relationships, and cardinality. Do not decompose any of the relationships at this point.

10 marks
c. Database Schema - Decompose the design to create a schema to store the data in a suitable normal form (2NF or 3NF). Say which normal form the design is in and justify your choice. List the tables and show the fields, primary keys, and any foreign keys in your schema. Describe any assumptions you have made or any additional fields you have added to your design. Make sure all the primary keys are a sensible choice and introduce new fields if needed. Draw a schema diagram to illustrate your design.

20 marks
d. Create Tables - Create a MySQL database to store the schema that you designed in part c. above. Create the tables using SQL statements and reproduce the code in your answer report. Define the keys and choose appropriate data types and any other restrictions you think are required.

20 marks
e. Insert the Data – Insert the data given above into the appropriate tables. Give a single example of an SQL statement that you used to insert one row of data into one of the tables.

10 marks
f. SQL Queries - Carry out the appropriate SQL queries of answering the following questions. For each query, give the SQL code and the result of running the query on the data in your database. Marks are given by each question.

i. Return a list of all dog names (2).

ii. Return a list of all dog breeds, showing each breed only once (3).

iii. Write a query to count how many dogs have the string “Labr” in their breed (2).

iv. Calculate the average age of all dogs in the kennel (2).

v. Calculate the average age of dogs by breed (3).

vi. Find the breed of dog that has an average age of more than 8 (4).

vii. List all the dog names along with their owners’ names (4).

viii. List all the dogs who have had a vet note recorded. Give the name of the dog and the date of the vet note (5).

ix. List all dogs, giving their name, and if a dog has had a vet visit, give the note for the visit, otherwise, if the dog has not visited the vet, return null in the vet note field (5).

Assignment ONE
RELATIONAL DATABASE DESIGN

Introduction
“It’s a Dog’s Life” is a kennel which operates just outside the village of Newtown. The kennel’s function is to look after dogs while their owners are out of town. To help with the running of the kennel, they maintain a spreadsheet of the name, breed, and age of each dog who is staying with them, as well as the name, address and phone number of each dog’s owners. The database also stores special instructions for the care of each dog, as well as which kennel room the dog is staying in, and a note of the unique microchip number which each dog has implanted in their neck. Every dog must have a chip number. Vet notes are added to the spreadsheet if a dog is seen by the vet and vet notes must be associated with a single dog.

The current way in which the data are stored is shown in the table below. Note that each person can own more than one dog and each dog can have more than one owner. The vet columns are empty unless the dog has been seen by the vet. A vet visit cannot exist without a dog, of course.

Dog Name

DogBreed

Dog Age

Owner

Owner Address

Owner Phone

DogChipNo

Note

Room

Vet ID

Vet Date

Vet Note

Fido

Labrador

10

Sarah Smith

The Meadows Newtown FK40 7LL

01234

567890

545682

None

1

Fido

Labrador

10

John Smith

The Meadows Newtown FK40 7LL

01234

567890

545682

None

1

Sheba

Labrador

9

Sarah Smith

The Meadows Newtown FK40 7LL

01234

567890

356784

None

2

76

20.05.18

Worming tablets given

Pat

Labradoodle

3

Sarah Smith

The Meadows Newtown FK40 7LL

01234

567890

746587

Enjoys petting

3

Paddy

Golden retriever

7

Frank Jones

14 Main Street Newtown FK40 6TT

0376

458015

546875

Enjoys all

6

Rex

Mongrel

6

Frank Jones

14 Main Street Newtown FK40 6TT

0376

458015

546888

Requires pills

12

( Page 1 of 3 )

Your assignment
You have been tasked to turn these data into a relational database. You will need to build the database and write a report about what you did. You only need to submit the report. It should have the following sections:

a. Introduction – Introduce the business requirements and describe one business rule and one use case you can identify from the scenario given above.

10 marks
b. ER Diagram - Identify the entities and relationships in the scenario given above and draw an ER diagram showing the entities, attributes, relationships, and cardinality. Do not decompose any of the relationships at this point.

10 marks
c. Database Schema - Decompose the design to create a schema to store the data in a suitable normal form (2NF or 3NF). Say which normal form the design is in and justify your choice. List the tables and show the fields, primary keys, and any foreign keys in your schema. Describe any assumptions you have made or any additional fields you have added to your design. Make sure all the primary keys are a sensible choice and introduce new fields if needed. Draw a schema diagram to illustrate your design.

20 marks
d. Create Tables - Create a MySQL database to store the schema that you designed in part c. above. Create the tables using SQL statements and reproduce the code in your answer report. Define the keys and choose appropriate data types and any other restrictions you think are required.

20 marks
e. Insert the Data – Insert the data given above into the appropriate tables. Give a single example of an SQL statement that you used to insert one row of data into one of the tables.

10 marks
f. SQL Queries - Carry out the appropriate SQL queries of answering the following questions. For each query, give the SQL code and the result of running the query on the data in your database. Marks are given by each question.

i. Return a list of all dog names (2).

ii. Return a list of all dog breeds, showing each breed only once (3).

iii. Write a query to count how many dogs have the string “Labr” in their breed (2).

iv. Calculate the average age of all dogs in the kennel (2).

v. Calculate the average age of dogs by breed (3).

vi. Find the breed of dog that has an average age of more than 8 (4).

vii. List all the dog names along with their owners’ names (4).

viii. List all the dogs who have had a vet note recorded. Give the name of the dog and the date of the vet note (5).

ix. List all dogs, giving their name, and if a dog has had a vet visit, give the note for the visit, otherwise, if the dog has not visited the vet, return null in the vet note field (5).

Submission
Please write your answers, save them to PDF and upload them in the assignment submission area on iStirling. Include your student number on the front page of the report, but DO NOT PUT YOUR NAME ANYWHERE on the report.

Late penalties of three marks per calendar day you are late in submitting will be applied, up to a maximum of seven calendar days, after which you will receive no grade for the assignment.

Plagiarism
Plagiarism is presenting somebody else’s work as your own. Plagiarism is a form of academic misconduct and is taken very seriously by the University. Students found to have plagiarised work can have marks deducted and, in serious cases, even be expelled from the University. Do not submit any work that is not entirely your own.

Homework is Completed By:

Writer Writer Name Amount Client Comments & Rating
Instant Homework Helper

ONLINE

Instant Homework Helper

$36

She helped me in last minute in a very reasonable price. She is a lifesaver, I got A+ grade in my homework, I will surely hire her again for my next assignments, Thumbs Up!

Order & Get This Solution Within 3 Hours in $25/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 3 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 6 Hours in $20/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 6 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 12 Hours in $15/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 12 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

6 writers have sent their proposals to do this homework:

Pro Writer
Academic Master
Premium Solutions
Financial Solutions Provider
Financial Assignments
Essay & Assignment Help
Writer Writer Name Offer Chat
Pro Writer

ONLINE

Pro Writer

I am an elite class writer with more than 6 years of experience as an academic writer. I will provide you the 100 percent original and plagiarism-free content.

$28 Chat With Writer
Academic Master

ONLINE

Academic Master

As an experienced writer, I have extensive experience in business writing, report writing, business profile writing, writing business reports and business plans for my clients.

$33 Chat With Writer
Premium Solutions

ONLINE

Premium Solutions

I have done dissertations, thesis, reports related to these topics, and I cover all the CHAPTERS accordingly and provide proper updates on the project.

$33 Chat With Writer
Financial Solutions Provider

ONLINE

Financial Solutions Provider

I reckon that I can perfectly carry this project for you! I am a research writer and have been writing academic papers, business reports, plans, literature review, reports and others for the past 1 decade.

$47 Chat With Writer
Financial Assignments

ONLINE

Financial Assignments

I have written research reports, assignments, thesis, research proposals, and dissertations for different level students and on different subjects.

$24 Chat With Writer
Essay & Assignment Help

ONLINE

Essay & Assignment Help

I am a PhD writer with 10 years of experience. I will be delivering high-quality, plagiarism-free work to you in the minimum amount of time. Waiting for your message.

$21 Chat With Writer

Let our expert academic writers to help you in achieving a+ grades in your homework, assignment, quiz or exam.

Similar Homework Questions

Ancient india flying machines - Using your knowledge exercise 27 the heart - Www learningwebdesign com 4e materials - Sample learning plan template - Who narrates the book thief - Astucia lights road studs australia - Find the energy stored in the 4.80 μf capacitor - Business - Maclean dixie helical piles - Shylock to bait fish withal speech - American History - Bath spa uni psychology - Propylene production process flow diagram - Molander corporation is a distributor of a sun umbrella - Catch 22 situation definition - Mrs pratchett roald dahl - Statistics and probability grade 6 - How to report a tukey post hoc test apa - Floor cheers for basketball - What kind of sales incentive plan do you recommend why - Full of sound and fury signifying nothing faulkner - George w bush library groupon - Radioactive dating game activity answers - Empty fields company pays its salaried - The orphan of chao - Home easy remote he 300 - Communicating a Problem - Royal mail printed papers - Infant observation repCHILD OBSERVATION ASSIGNMENT REPORT Summer 2019 CHILD OBSERVTION REPORT DESCRIPTION: will write two separate child Observation Reports to fulfill these assignments involving observing a child of different ages (an infant OR toddler age and an early childhood OR a school-age child) and will then use the child observation notes as a basis for writing a report about the child’s development in the domains. Each report is worth 65 points. It is a course requirement that students complete both observation reports. If a student does not pass in the Observation Reports the notes will not be graded for credit. If a student does not pass in both observations any extra credit points will not be graded as part of the final grade. Students should use the Child Observation Grading Report Form for the report. Do not make your own form or copy/change the form in any way. Do not pass in a grading form that you have made a PDF document. FINAL CHILD OBSERVATION ort example - Financial analysis paper - Malapropism much ado about nothing - Calculus chain rule practice problems - Need 600+ words and 1+ schoarly references in Apa format with no plagiarism follow instructions below. - Short essay - Stationary and rotating anode - Help with assignment - Superconducting magnetic energy storage pdf - Urea cycle defect presentation - Week 7 - Fat twins alice in wonderland - I will not be commanded sons of anarchy song lyrics - Select characteristics exhibited by exotoxins but not exhibited by endotoxins - How does kit kat advertise - Math internet scavenger hunt - Speech peer review - Wacc investopedia video - History of dijkstra's algorithm - Performing automatic ide configuration dell optiplex 780 - Average weight for adult male - Discussion 1A - St catherine university nursing - Seneca college grades and marks - Accounting Research and Communication - What is the muscular layer of the heart - Caravan leg winder drill bit australia - Bmgt 364 project 3 leading - 9781260906301 - Introduction to disk operating system - Grundfos cr 32 2 - Module 5 Discussion Question - Paper - Yale university chemical engineering - Le chatelier's principle buffers lab answers - In front productions nuance productions tristar television - Paper - ABs6 - The engineering marvel of chicago's water intake cribs - Functional behavior assessment interview form - Ncea level 1 biology microorganisms - Cruzan v. Director, Missouri Department of Health, 497 U.S. 261 (1990) - Animal farm quiz pdf - Presentation Power Point - SOCW 6111 Wk 11 Discussion: Biopsychosocial Holistic Approach - A company that pursues and achieves strategic objectives - Preoperative phase nursing care - Nursing process worksheet - David hyatt psychologist ballarat - St thomas x ray - Writing a program in COBOL. - Duplexity theory of vision - Cultural diversity in correctional facilities - Vocabulary - 2 wire irrigation system - Paul bernstein pershing square foundation - Apollo manual call point wiring diagram - Curved mirrors and the law of reflection worksheet answers - Escience labs biology answer key - Assignment Analyzation & Visualization - #3 assignment - Themes in behind the beautiful forevers - International computer driving license syllabus - Trans Atlantic Slavery in Jamaica - Straight outta compton scattering - Papa model risk management - School captain speeches examples - Leverline soap dispenser refill - ASSIGNMENT 3 - “There is something special about human nature in comparison to other animals” Do you agree with this statement? Provide an argument either attacking or supporting this proposition using reasons and evidence. - Human impact on the environment worksheet answer key - Capsim situation analysis answers 2019