1. Homepage
  2. Writing
  3. CSC343 Introduction to Databases - Assignment 2 - Warmup
This question has been solved

CSC343 Introduction to Databases - Assignment 2 - Warmup

Order Now
TorontoCSC343Introduction to DatabasesSQLPostgreSQL

Copyright (c) 2024 Jacqueline Smith & Marina Tawfik Assignment Writing Service

Assignment 2 Warmup
Assignment Writing Service

Due: Wednesday, October 9, before 4:00 p.m. Assignment Writing Service

Learning Goals Assignment Writing Service

This assignment aims to help you learn to: Assignment Writing Service

run SQL code on a remote server
work with provided SQL starter code files write queries in SQL Assignment Writing Service

Please read this assignment thoroughly before you proceed. Failure to follow instructions can affect your grade. Assignment Writing Service

We will be testing your code in the CS Teaching Labs environment using PostgreSQL. It is your responsibility to make sure your code runs in this environment before the deadline! Code which works on your machine but not on the CS Teaching Labs will not receive credit. Assignment Writing Service

This assignment is to be done individually. Assignment Writing Service

The Domain Assignment Writing Service

In this assignment, we will work with a database for a veterinary clinic, with a similar but not identical schema to the one you saw in Assignment 1. Keep in mind that your code for this assignment must work on any database instance (including ones with empty tables) that satisfies the schema. Assignment Writing Service

All values of type time, timestamp etc. in the dataset provided are on a 24-hour clock. Assignment Writing Service

Begin by getting familiar with the schema that we have provided vet warmup schema.ddl. You will work with a very similar schema on Assignment 2. Assignment Writing Service

What to do General requirements Assignment Writing Service

Since your code must run correctly on the Teaching Labs (dbsrv1, specifically), you will need to test your code there before you submit. We also suggest you do your work on the Teaching Labs, rather than installing PostgreSQL locally. To do that, you will need to have a process for working on a remote server. If you are not familiar with tools like ssh or scp, and other Unix-based command line tools, we recommend giving yourself some extra time to figure those out. Being able to use a command line text editor (e.g. vim, emacs, nano) will also be helpful. If you don’t know how to use one, we recommend choosing the one that the people around you use, so you can ask them questions and observe what they do. Assignment Writing Service

This is an individual assignment, which means you should be able to work on a remote server yourself, and write and debug your own SQL queries. If you need help with using the command line and working on a remote server, it is OK to ask your classmates or friends for help with that, as long as you can do it yourself by the time you submit the assignment. If you need help with the queries, please ask the CSC343 course staff. There will be additional office hours added in advance of the assignment deadline. We expect that the queries are your own individual work, and no one else has helped you write or debug them. Assignment Writing Service

Assignment Writing Service

The schema and data Assignment Writing Service

Copyright (c) 2024 Jacqueline Smith & Marina Tawfik Assignment Writing Service

Included in the starter files is a file called vet warmup schema.ddl, which defines the schema for this assignment. We have also provided files in the data folder to populate the tables with data. Assignment Writing Service

In order to be able to work on your queries, you will need to copy these files to dbsrv1 and use \i to import first the schema DDL file and then the data (import data.sql) into psql. You do NOT need to reload the data every time you open PostgreSQL; just remember to set your search path. The data is still there. Assignment Writing Service

The queries Assignment Writing Service

To ensure that your query results match the form expected by the auto-tester (attribute types and order, for instance), we are providing a schema for the result of each query. These can be found in files wu1.sql, wu2.sql, and wu3.sql. You must add your solution code for each query to the corresponding file. Make sure that each file is entirely self- contained, and not dependent on any other files; each will be run separately on a fresh database instance, and so (for example) any views you create in wu1.sql will not be accessible in wu3.sql. Assignment Writing Service

Write SQL queries for each of the following: Assignment Writing Service

  1. Find the procedure(s) that have been done by the most staff. Report the procedure ID(s), and the number of unique staff who have done that procedure. Assignment Writing Service

  2. A “high-needs” patient is one that has had more than one and a half times the average number of appointments in the last calendar year (i.e., 2023). (Yes, the patient is included in the average.) Find the IDs of all high-needs patients and the number of appointments they have scheduled in 2024. Assignment Writing Service

  3. A patient is considered “young” if they are under 3 years old, “senior” if they are over 8 years old, and “adult” otherwise. Their age should be calculated as of the current date. Assignment Writing Service

    For each month of 2024, report the number of patients in each age category who had an appointment where they saw a vet (DVM). Include only those patients who saw in vet in 2024 in the results. Assignment Writing Service

    As part of this query, you will need to take a look at the PostgreSQL documentation to learn about the command CAST. We have provided a type for you to use to represent the age category of a patient. You will also have to look at the documentation to learn how to work with dates in PostgreSQL. In particular, we expect EXTRACT will be helpful to you. Assignment Writing Service

Submission instructions Assignment Writing Service

For this assignment, you will hand in your three .sql files to MarkUs. Check that you have submitted the correct version of your file by downloading it from MarkUs. New files will not be accepted after the due date. Make sure that the files you submit run. This assignment will be autotested, and there will be no remarks. We will provide a checker for you to run that will confirm we can run your code, but it does not do thorough testing. You are responsible for testing your own code. Assignment Writing Service

联系辅导老师!
私密保护
WeChat 微信
Toronto代写,CSC343代写,Introduction to Databases代写,SQL代写,PostgreSQL代写,Toronto代编,CSC343代编,Introduction to Databases代编,SQL代编,PostgreSQL代编,Toronto代考,CSC343代考,Introduction to Databases代考,SQL代考,PostgreSQL代考,Toronto代做,CSC343代做,Introduction to Databases代做,SQL代做,PostgreSQL代做,Torontohelp,CSC343help,Introduction to Databaseshelp,SQLhelp,PostgreSQLhelp,Toronto作业代写,CSC343作业代写,Introduction to Databases作业代写,SQL作业代写,PostgreSQL作业代写,Toronto编程代写,CSC343编程代写,Introduction to Databases编程代写,SQL编程代写,PostgreSQL编程代写,Toronto作业答案,CSC343作业答案,Introduction to Databases作业答案,SQL作业答案,PostgreSQL作业答案,