SlideShare a Scribd company logo
Write and run three interesting queries
FOR MORE CLASSES VISIT
tutorialoutletdotcom
(worth 25% of overall Project 1 grade) Your team and "project
mentor"
You will do Part 2 of Project 1 with the same team as for Part 1. If your
team partner dropped the class and you
did not submit a contingency plan for this with your Part 1 submission,
then unfortunately you will still have to
complete the whole project by yourself. If you team partner dropped the
class and you did submit a contingency
plan for this with your Part 1 submission, then you are welcome to
switch to this reduced version of your
project.
For continuity, the IA who grades your Part 1 will grade the two
remaining parts of your project. (In many but
not all cases, this is the IA with whom you met to discuss Part 1.) This
IA will be your "project mentor" for
the remainder of your project; the name of your mentor will be included
in your graded Part 1. You are welcome
to contact other members of the class staff (including the instructor)
about your project, but your project mentor
should be your main contact, for continuity, since your mentor will be
grading all parts of the project.
As mentioned earlier, both students in a team will receive the same
grade for Project 1. Team partners are
expected to fully collaborate with each other on solving the project.
However, communication about project
details with somebody other than your partner is not permitted, and is
considered cheating. If in doubt about
what kinds of consultations are allowed, check with the instructor, or see
the Computer Science Department's
policies and procedures on academic honesty. Questions of a general
nature that may be of interest to the whole
class should be posted to the CourseWorks discussion board. Overview
of Part 2 of Project 1
For Part 2 of this project, which you should submit electronically, you
should implement your relations of Part
1 over our PostgreSQL database server and load your tables with some
real or realistic data, as you outlined in
Part 1. What you need to do for Part 2
1. Open and set up your Google Cloud account using the detailed
instructions available here. You should
have received an email from Aayush with your individual Google Cloud
code and also with credentials
for your PostgreSQL database account. If you haven't received this
email (please check your
@columbia.edu email address), please contact Aayush immediately.
2. Familiarize yourself with the PostgreSQL DBMS by reading the
materials available at
http://www.postgresql.org/docs/9.3/interactive/index.html. You will be
using version 9.3 on Google
Cloud. Please check these materials carefully before sending email to the
class staff with questions on
syntax or supported features.
3. Use ssh to connect to your Google Cloud virtual machine, using the
instructions available here.
4. Connect to our section's PostgreSQL database server, which is
running at 104.196.135.151, by running:
psql U <uni> h 104.196.135.151 d proj1part2
Note: You only need to set up one single PostgreSQL account/database
per team, even though your
http://www.cs.columbia.edu/~gravano/cs4111/proj12.html 1/3 3/7/2017
cs4111.001: Project 1, Part 2 team was assigned one account per
teammate. Pick just one of the two accounts arbitrarily and work on it
together with your teammate. You will need to let us know with your
submission which of the team's two
PostgreSQL accounts we should use for grading (see "What to
submit..." section below, item 2). You will be prompted for your
PostgreSQL password, which you should have received by email from
Aayush. To change your PostgreSQL password when you first connect,
which we recommend, type the
following inside the psql prompt: ALTER USER <uni> WITH
PASSWORD '<new password>' (the
single quotes are necessary). 5. Make all suggested changes to the
overall design in general, and to the SQL schema in particular, once
you receive your graded Part 1. You are likely to have extensive
comments from your project mentor in
your graded Part 1. Your Part 2 grade will be based in part on how well
you have incorporated your
project mentor's comments. If you have any questions about these
comments once you received them,
please contact your project mentor as soon as possible to clarify.
6. Add any additional attributebased CHECK constraints and tuplebased
CHECK constraints (as
discussed in class) that you need so as to express any realworld
constraints of your application that are
missing from your SQL schema. You can find helpful documentation on
constraints in PostgreSQL here.
Note that PostgreSQL does not support general assertions. You do not
need to use triggers for this project,
and you can ignore any realworld constraints that you could not capture
with either goodstyle (as
discussed in class) attribute or tuplebased CHECK constraints, or with
PRIMARY KEY, UNIQUE,
FOREIGN KEY, and NOT NULL constructs. (Hint: "Good-
style" attribute or tuplebased CHECK
constraints tend to refer only to the table in which they are defined,
never to other tables.)
7. Create all the SQL tables in your revised SQL schema on your
PostgreSQL account (see documentation
on CREATE TABLE and on data types), including all constraints that
you could specify in the table
declarations as described above. Suggestion: Please use varchar(n) with
an appropriate value for n as the
domain for variablelength string attributes such as names, instead of a
fixedlength char domain.
varchar(n) will simplify your handling of such attributes in Part 3,
particularly if you are following the
Web FrontEnd Option.
8. Insert into each table in your database, on average, at least 10 tuples
of real or "realistic" data, as
you described in your Part 1 project description. This data will help you
test and play with your database.
Of course, issue queries of your choice to make sure that everything
works as you intend.
9. Write and run three interesting queries, which you will include with
your submission. Collectively, the
three queries should cover use of multitable joins, aggregation, and
WHEREclause conditions. (These
features don't need to appear in each of the three queries, but they should
appear in at least one of the three
interesting queries.)
IMPORTANT NOTE: So that you don't exhaust your Google Cloud
credits and also to avoid wasting energy
make sure to turn off your virtual machine on Google Cloud whenever
you are not using it, by following the
instructions available here. What to submit and when
You will submit this part of the project electronically on CourseWorks
directly. The deadline is Friday March
3 at 5 p.m. EST. By now you have joined (for Part 1) one of the
"Project 1 Group" groups on CourseWorks.
Just as for Part 1, you should submit your project exactly once per team,
rather than once per student. To submit
your project, you need to be in the Class view (not the Group view) on
CourseWorks and then upload your file
to the "Part 2" assignment under Assignments. You should
submit a single (uncompressed) file containing: 1. The name and UNI of
both teammates.
2. The PostgreSQL account name for your database on our server (i.e.,
specify which teammate's UNI we
should use to identify the database for your team). This is the database
on which we will base our grading.
3. Three "interesting" SQL queries over your database, with
a sentence or two per query explaining what the
query is supposed to compute. The goal of these queries is to help us
better understand your application.
You will not be graded on these queries, but we strongly suggest that
you submit well formed queries that
http://www.cs.columbia.edu/~gravano/cs4111/proj12.html 2/3 3/7/2017
cs4111.001: Project 1, Part 2 run without problems, so please make sure
that you have tested your queries by running them on your
database exactly as submitted (use copy and paste). Late policy for
projects
Please check the Project Lateness Policy. Grading for Part 2
Your grade for Part 2 of Project 1 will be split as follows:
1. Quality of final SQL schema and implementation on PostgreSQL: 10
points.
We will evaluate the overall quality of your final SQL schema on
PostgreSQL, especially in terms of how
thoroughly you incorporated any revisions suggested by your project
mentor in the grading of Part 1 of
your project.
2. Quality of constraint handling: 10 points.
We will evaluate how well you managed to capture realworld constraints
through primary key, foreign
key, unique, and goodstyle attribute and tuplebased CHECK constraints.
3. Quality of the realworld (or at least realistic) data that you loaded into
the database: 5 points.
************************************************
************************************************

More Related Content

PDF
Computer Project for class 12 CBSE on school management
PPT
香港六合彩
PPTX
STACK OVERFLOW DATASET ANALYSIS
PPT
Talk 1: Google App Engine Development: Java, Data Models, and other things yo...
PDF
14 computer science_new
PDF
14_Computer_science_New.pdf
PDF
2015 syllabus 12_computer_science_new
PDF
vtu data structures lab manual bcs304 pdf
Computer Project for class 12 CBSE on school management
香港六合彩
STACK OVERFLOW DATASET ANALYSIS
Talk 1: Google App Engine Development: Java, Data Models, and other things yo...
14 computer science_new
14_Computer_science_New.pdf
2015 syllabus 12_computer_science_new
vtu data structures lab manual bcs304 pdf

Similar to Write and run three interesting queries/tutorialoutlet (20)

PDF
Das patrac sandpythonwithpracticalcbse11
DOCX
BTE 320-498 Summer 2017 Take Home Exam (200 poi.docx
DOCX
CIS 336 (DEVRY) Entire Course NEW
PDF
ELAVARASAN.pdf
PDF
Library Management Python, MySQL
DOC
purva_transcript-II
PPT
11 syllabus
PPT
11 Python CBSE Syllabus
PPTX
Presentation on po pshjhhjhekhhkkhkhjpeo
DOCX
CSCI 2215 — Databases — Fall 2015HW 1, Due Friday, 092515.docx
PDF
Base de Datos
DOCX
CIS2245 Software EngineeringAmjad Alharbi, Quality AssuranceJ.docx
PDF
syllabusCS.pdf
PPTX
C++ student management system
PDF
Informatics_Practices_SrSec_2024-25.pdf.
PDF
Digital-Library with pdf for class 12 c.s
PDF
Python and MySQL Linking Class 12th Project File 23-24
PPTX
Presentation on a website of Department of computer science and engineering
DOC
C programming project by navin thapa
PPT
Chapter 0 syllabus 2019 20
Das patrac sandpythonwithpracticalcbse11
BTE 320-498 Summer 2017 Take Home Exam (200 poi.docx
CIS 336 (DEVRY) Entire Course NEW
ELAVARASAN.pdf
Library Management Python, MySQL
purva_transcript-II
11 syllabus
11 Python CBSE Syllabus
Presentation on po pshjhhjhekhhkkhkhjpeo
CSCI 2215 — Databases — Fall 2015HW 1, Due Friday, 092515.docx
Base de Datos
CIS2245 Software EngineeringAmjad Alharbi, Quality AssuranceJ.docx
syllabusCS.pdf
C++ student management system
Informatics_Practices_SrSec_2024-25.pdf.
Digital-Library with pdf for class 12 c.s
Python and MySQL Linking Class 12th Project File 23-24
Presentation on a website of Department of computer science and engineering
C programming project by navin thapa
Chapter 0 syllabus 2019 20
Ad

Recently uploaded (20)

PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPTX
Presentation on HIE in infants and its manifestations
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Complications of Minimal Access Surgery at WLH
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
VCE English Exam - Section C Student Revision Booklet
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
Pharma ospi slides which help in ospi learning
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
Cell Structure & Organelles in detailed.
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PDF
01-Introduction-to-Information-Management.pdf
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
Lesson notes of climatology university.
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Presentation on HIE in infants and its manifestations
Microbial disease of the cardiovascular and lymphatic systems
Complications of Minimal Access Surgery at WLH
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
O7-L3 Supply Chain Operations - ICLT Program
human mycosis Human fungal infections are called human mycosis..pptx
102 student loan defaulters named and shamed – Is someone you know on the list?
VCE English Exam - Section C Student Revision Booklet
Final Presentation General Medicine 03-08-2024.pptx
Pharma ospi slides which help in ospi learning
Chinmaya Tiranga quiz Grand Finale.pdf
Supply Chain Operations Speaking Notes -ICLT Program
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Cell Structure & Organelles in detailed.
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
01-Introduction-to-Information-Management.pdf
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Lesson notes of climatology university.
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Ad

Write and run three interesting queries/tutorialoutlet

  • 1. Write and run three interesting queries FOR MORE CLASSES VISIT tutorialoutletdotcom (worth 25% of overall Project 1 grade) Your team and "project mentor" You will do Part 2 of Project 1 with the same team as for Part 1. If your team partner dropped the class and you did not submit a contingency plan for this with your Part 1 submission, then unfortunately you will still have to complete the whole project by yourself. If you team partner dropped the class and you did submit a contingency plan for this with your Part 1 submission, then you are welcome to switch to this reduced version of your project. For continuity, the IA who grades your Part 1 will grade the two remaining parts of your project. (In many but not all cases, this is the IA with whom you met to discuss Part 1.) This IA will be your "project mentor" for the remainder of your project; the name of your mentor will be included in your graded Part 1. You are welcome to contact other members of the class staff (including the instructor) about your project, but your project mentor should be your main contact, for continuity, since your mentor will be grading all parts of the project. As mentioned earlier, both students in a team will receive the same grade for Project 1. Team partners are expected to fully collaborate with each other on solving the project. However, communication about project details with somebody other than your partner is not permitted, and is considered cheating. If in doubt about
  • 2. what kinds of consultations are allowed, check with the instructor, or see the Computer Science Department's policies and procedures on academic honesty. Questions of a general nature that may be of interest to the whole class should be posted to the CourseWorks discussion board. Overview of Part 2 of Project 1 For Part 2 of this project, which you should submit electronically, you should implement your relations of Part 1 over our PostgreSQL database server and load your tables with some real or realistic data, as you outlined in Part 1. What you need to do for Part 2 1. Open and set up your Google Cloud account using the detailed instructions available here. You should have received an email from Aayush with your individual Google Cloud code and also with credentials for your PostgreSQL database account. If you haven't received this email (please check your @columbia.edu email address), please contact Aayush immediately. 2. Familiarize yourself with the PostgreSQL DBMS by reading the materials available at http://www.postgresql.org/docs/9.3/interactive/index.html. You will be using version 9.3 on Google Cloud. Please check these materials carefully before sending email to the class staff with questions on syntax or supported features. 3. Use ssh to connect to your Google Cloud virtual machine, using the instructions available here. 4. Connect to our section's PostgreSQL database server, which is running at 104.196.135.151, by running: psql U <uni> h 104.196.135.151 d proj1part2 Note: You only need to set up one single PostgreSQL account/database per team, even though your http://www.cs.columbia.edu/~gravano/cs4111/proj12.html 1/3 3/7/2017 cs4111.001: Project 1, Part 2 team was assigned one account per teammate. Pick just one of the two accounts arbitrarily and work on it
  • 3. together with your teammate. You will need to let us know with your submission which of the team's two PostgreSQL accounts we should use for grading (see "What to submit..." section below, item 2). You will be prompted for your PostgreSQL password, which you should have received by email from Aayush. To change your PostgreSQL password when you first connect, which we recommend, type the following inside the psql prompt: ALTER USER <uni> WITH PASSWORD '<new password>' (the single quotes are necessary). 5. Make all suggested changes to the overall design in general, and to the SQL schema in particular, once you receive your graded Part 1. You are likely to have extensive comments from your project mentor in your graded Part 1. Your Part 2 grade will be based in part on how well you have incorporated your project mentor's comments. If you have any questions about these comments once you received them, please contact your project mentor as soon as possible to clarify. 6. Add any additional attributebased CHECK constraints and tuplebased CHECK constraints (as discussed in class) that you need so as to express any realworld constraints of your application that are missing from your SQL schema. You can find helpful documentation on constraints in PostgreSQL here. Note that PostgreSQL does not support general assertions. You do not need to use triggers for this project, and you can ignore any realworld constraints that you could not capture with either goodstyle (as discussed in class) attribute or tuplebased CHECK constraints, or with PRIMARY KEY, UNIQUE, FOREIGN KEY, and NOT NULL constructs. (Hint: "Good- style" attribute or tuplebased CHECK constraints tend to refer only to the table in which they are defined, never to other tables.) 7. Create all the SQL tables in your revised SQL schema on your
  • 4. PostgreSQL account (see documentation on CREATE TABLE and on data types), including all constraints that you could specify in the table declarations as described above. Suggestion: Please use varchar(n) with an appropriate value for n as the domain for variablelength string attributes such as names, instead of a fixedlength char domain. varchar(n) will simplify your handling of such attributes in Part 3, particularly if you are following the Web FrontEnd Option. 8. Insert into each table in your database, on average, at least 10 tuples of real or "realistic" data, as you described in your Part 1 project description. This data will help you test and play with your database. Of course, issue queries of your choice to make sure that everything works as you intend. 9. Write and run three interesting queries, which you will include with your submission. Collectively, the three queries should cover use of multitable joins, aggregation, and WHEREclause conditions. (These features don't need to appear in each of the three queries, but they should appear in at least one of the three interesting queries.) IMPORTANT NOTE: So that you don't exhaust your Google Cloud credits and also to avoid wasting energy make sure to turn off your virtual machine on Google Cloud whenever you are not using it, by following the instructions available here. What to submit and when You will submit this part of the project electronically on CourseWorks directly. The deadline is Friday March 3 at 5 p.m. EST. By now you have joined (for Part 1) one of the "Project 1 Group" groups on CourseWorks. Just as for Part 1, you should submit your project exactly once per team, rather than once per student. To submit your project, you need to be in the Class view (not the Group view) on
  • 5. CourseWorks and then upload your file to the "Part 2" assignment under Assignments. You should submit a single (uncompressed) file containing: 1. The name and UNI of both teammates. 2. The PostgreSQL account name for your database on our server (i.e., specify which teammate's UNI we should use to identify the database for your team). This is the database on which we will base our grading. 3. Three "interesting" SQL queries over your database, with a sentence or two per query explaining what the query is supposed to compute. The goal of these queries is to help us better understand your application. You will not be graded on these queries, but we strongly suggest that you submit well formed queries that http://www.cs.columbia.edu/~gravano/cs4111/proj12.html 2/3 3/7/2017 cs4111.001: Project 1, Part 2 run without problems, so please make sure that you have tested your queries by running them on your database exactly as submitted (use copy and paste). Late policy for projects Please check the Project Lateness Policy. Grading for Part 2 Your grade for Part 2 of Project 1 will be split as follows: 1. Quality of final SQL schema and implementation on PostgreSQL: 10 points. We will evaluate the overall quality of your final SQL schema on PostgreSQL, especially in terms of how thoroughly you incorporated any revisions suggested by your project mentor in the grading of Part 1 of your project. 2. Quality of constraint handling: 10 points. We will evaluate how well you managed to capture realworld constraints through primary key, foreign key, unique, and goodstyle attribute and tuplebased CHECK constraints. 3. Quality of the realworld (or at least realistic) data that you loaded into the database: 5 points.