The Student Registry Database Ian Van Houdt and Muna alfahad.

Slides:



Advertisements
Similar presentations
ER Model For a college DB
Advertisements

4d. Structured Query Language – JOIN Operation Lingma Acheson Department of Computer and Information Science IUPUI CSCI N207 Data Analysis with Spreadsheets.
Step By Step Lei Yang Computer Science Department.
พีชคณิตแบบสัมพันธ์ (Relational Algebra) บทที่ 3 อ. ดร. ชุรี เตชะวุฒิ CS (204)321 ระบบฐานข้อมูล 1 (Database System I)
SQL-week5-1 In-Class Exercise Answer IST 210 Organization of Data IST2101.
TURKISH STATISTICAL INSTITUTE 1 /34 SQL FUNDEMANTALS (Muscat, Oman)
Class Scope class Student { private: string id; string firstName, lastName; float gpa; public: void Read() { cin >> id >> firstName >> lastName >> gpa;
 Database is SQL1.mdb ◦ import using MySQL Migration Toolkit 
Using Relational Databases and SQL Steven Emory Department of Computer Science California State University, Los Angeles Lecture 7: Subqueries and Set Operations.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 6 (Continued) The Relational Algebra and Calculus.
Chapter 6 Additional Relational Operations Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2008.
DatabaseDatabase cs453 Lab8 1 Ins.Ebtesam AL-Etowi.
SQL Sub (or Nested ) Query. Examples Q: Find students whose GPA is below the average. –The criteria itself requires a SQL statement. –SELECT * FROM student.
DATABASE PROGRAMMING Sections 5-7. Write a query that shows the average, maximum, and minimum salaries for all employees with jobs in the programming.
Data Warehousing/Mining 1 Data Warehousing/Mining Comp 150 Aggregation in SQL (not in book) Instructor: Dan Hebert.
INTRODUCTION TO DATABASE MANAGEMENT SYSTEMS Dr. Adam Anthony Fall 2012.
Introduction to Data Structure, Fall 2006 Slide- 1 California State University, Fresno Introduction to Data Structure Chapter 14 Ming Li Department of.
WELCOME TO THE KINESIOLOGY INTERCOLLEGE TRANSFER INFORMATION PRESENTATION.
©Silberschatz, Korth and Sudarshan3.1Database System Concepts - 6 th Edition SQL Schema Changes and table updates instructor teaches.
Interpreting SQL Code. SQL (The language used to query a database) S is used to specify the you want to include. F is used to specify the the selected.
Database I. Practice SQL.
SQL for Data Retrieval. Save your SQL Scripts When working with SQL Management Studio, you should keep saving your scripts as a.sql file to somewhere.
SQL Operations Aggregate Functions Having Clause Database Access Layer A2 Teacher Up skilling LECTURE 5.
SQL for Data Retrieval. Running Example IST2102 Data Preparation Login to SQL server using your account Download three SQL script files from wiki page.
Using Relational Databases and SQL Department of Computer Science California State University, Los Angeles Lecture 8: Subqueries.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 3: Introduction.
Chapter 3 Introduction to SQL Yonsei University 1 st Semester, 2015 Sanghyun Park.
Computer Science Graduate Studies in U of Memphis.
CSc-340 2b1 Introduction to SQL Chapter 3 [2 of 2] Null Values Aggregate Functions Nested Subqueries Modification of the Database.
1 ICS 184: Introduction to Data Management Lecture Note 10 SQL as a Query Language (Cont.)
Programming using C# Joins SQL Injection Stored Procedures
ICOM 6005 – Database Management Systems Design Dr. Manuel Rodríguez Martínez Electrical and Computer Engineering Department Lecture 4– Structured Query.
©Silberschatz, Korth and Sudarshan1Database System Concepts - 6 th Edition E-R Diagram for a University Enterprise.
1 Agenda – 10/24/2013 Answer questions from lab on 10/22. Present SQL View database object. Present SQL UNION statement.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 4: Intermediate.
SQL for Data Retrieval. Running Example IST2102 Data Preparation Login to SQL server using your account Select your database – Your database name is.
MIS 3053 Database Design & Applications The University of Tulsa Professor: Akhilesh Bajaj RM/SQL Lecture 5 © Akhilesh Bajaj, 2000, 2002, 2003, All.
STRUCTURED QUERY LANGUAGE SQL-III IST 210 Organization of Data IST210 1.
INTRODUCTION TO DATABASE MANAGEMENT SYSTEMS Dr. Adam Anthony Fall 2012.
SQL for Data Retrieval. Save your SQL Scripts When working with SQL Management Studio, you should keep saving your scripts as a.sql file to somewhere.
1 CSE 480: Database Systems Lecture 12: SQL (Nested queries and Aggregate functions)
SQL-5 In-Class Exercise Answer IST 210 Organization of Data IST2101.
CS 405G: Introduction to Database Systems Instructor: Jinze Liu Fall 2009.
Subqueries.
CS 3630 Database Design and Implementation. Where Clause and Aggregate Functions -- List all rooms whose price is greater than the -- average room price.
COMP 430 Intro. to Database Systems Grouping & Aggregation Slides use ideas from Chris Ré and Chris Jermaine. Get clickers today!
Structured Query Language SQL-II IST 210 Organization of Data IST2101.
Chapter 11 – Data Manipulation: Relational Algebra and SQL1 Unit 9: Data Manipulation: Relational Algebra and SQL IT238: Data Modeling and Database Design.
CS122 Using Relational Databases and SQL Huiping Guo Department of Computer Science California State University, Los Angeles 4. Subqueries and joins.
Using Subqueries to Solve Queries
Chapter 3 Introduction to SQL
CS 480: Database Systems Lecture 12 February 11, 2013.
Chapter 3 Introduction to SQL(3)
Concept of Aggregation in SQL
Relational Schemas Classroom (building, room-number, capacity) Department (dept-name, building, budget) Course (course-id, title, dept-name, credits) Instructor.
Using Subqueries to Solve Queries
Chapter 4: Intermediate SQL Joins
Database Structure Chapter 16.
Generalization.
Computer Information Systems
CS 405G: Introduction to Database Systems
Associate in Business Degree Direct Transfer in
CS4222 Principles of Database System
CMPT 354: Database System I
Using Subqueries to Solve Queries
SQL Subquery.
Using Subqueries to Solve Queries
Using Subqueries to Solve Queries
Database Management System
CS122 Using Relational Databases and SQL
Presentation transcript:

The Student Registry Database Ian Van Houdt and Muna alfahad

Queries

Exercise.. List the elective courses o Use “Except”

Exercise.. List the departments that do not have any courses yet o Try to list the department name and name this attribute “department” + college name and name it “college” o Try to use “join” and “IN predicate”

Exercise.. Show majors (name) and the courses (code + name) each major offers. Sort by major name

Exercise.. List all courses and their prerequisites if any o Use “LEFT Join” o Sorted by course id

Exercise.. List maximum, minimum and average salaries of the instructors in each department (name) o Sorted by the department name

Exercise.. Show students who have more than one major o Student id, first_name, middle_name, last_name, and the number of majors as “no. of majors”

Exercise.. Show CS and MATH courses in Fall 2014 o Course code, building number, room number, day and time o CS department id is 13 & Math department id is 8

Exercise.. Americans instructors whose salaries are greater than the maximum salary of German instructors o Instructor id, first_name, middle_name, last_name, job_title and salary o Use subquery

Exercise.. Show the elective courses that offered by each major o Course id, course code, course name, and major name o Try to use “IN or NOT IN predicate”

Exercise.. Show the Canadian student with the best GPA o Student id, first name, last name o Try to use Subquery in Where clause, and the ALL predicate

Exercise.. List all Computer Science exchange students o Student id, first name, last name, nationality

Exercise.. Find CS student with the highest GPA o Id, first and last name o Try using a subquery in the Where clause

Exercise.. Find terms and years that CS 202 has been offered

Exercise.. List the nationality and the number of students from that country that are CS majors Order by most to least

Exercise.. List the id, first and last name of the highest performing CS student (GPA)