Exam 2 Review. SQL – Create Table REMEMBER!! – Create table mxws.Contact ( ContactID INT(10) NOT NULL,.., primary key (contactID));

Slides:



Advertisements
Similar presentations
NMED 3850 A Advanced Online Design February 25, 2010 V. Mahadevan.
Advertisements

Maintenance Modifying the data –Add records –Delete records –Update records Modifying the design –Add fields into tables –Remove fields from a table –Change.
CSE 190: Internet E-Commerce Lecture 10: Data Tier.
1 Introduction to Web Application Introduction to Data Base.
SQL Joins.
CHAPTER 7 Database: SQL, MySQL. Topics  Introduction  Relational Database Model  Relational Database Overview: Books.mdb Database  SQL (Structured.
 SQL stands for Structured Query Language.  SQL lets you access and manipulate databases.  SQL is an ANSI (American National Standards Institute) standard.
Databases in Visual Studio. Database in VisualStudio An MS SQL database are built in Visual studio The Name can be something like ”(localdb)\Projects”
Component 4/Unit 6f Topic VI: Create simple querying statements for the database The SELECT statement Clauses Functions Joins Subqueries Data manipulation.
Constraints  Constraints are used to enforce rules at table level.  Constraints prevent the deletion of a table if there is dependencies.  The following.
Final Exam Guide PHP NOTE: PHP CODE WILL BE BLUE, HTML IS BLACK EXAMPLE
SQL Basics. 5/27/2016Chapter 32 of 19 Naming SQL commands are NOT case sensitive SQL commands are NOT case sensitive But user identifier names ARE case.
Databases MIS 21. Some database terminology  Database: integrated collection of data  Database Management System (DBMS): environment that provides mechanisms.
SQL for Data Retrieval. Review Questions of Previous Class Q1. Show the sum of hours worked for project with ID 1200 (use ASSIGNMENT table) – Use “SUM”
SQL: DDL. SQL Statements DDL - data definition language –Defining and modifying data structures (metadata): database, tables, views, etc. DML - data manipulation.
Getting to Know SQL. © Jim Hope 2002 All Rights Reserved Data Manipulation SELECT statement INSERT INTO statement UPDATE statement DELETE statement TRANSFORM.
Recap of SQL Lab no 8 Advance Database Management System.
SQL Structured Query Language 1. Data Definition Language (DDL) is used to manage table and define data structure i.e. CREATE, ALTER, DROP Data Control.
CIS 375—Web App Dev II SQL. 2 Introduction SQL (Structured _______ Language) is an ANSI standard language for accessing databases.ANSI SQL can execute.
Subqueries Steve Perry 1.
What’s a database? Data stored in a structured format that lends itself to easy manipulation and recall.
Constraints cis 407 Types of Constraints & Naming Key Constraints Unique Constraints Check Constraints Default Constraints Misc Rules and Defaults Triggers.
RDBMS MySQL. MySQL is a Relational Database Management System MySQL allows multiple tables to be related to each other. Similar to a Grandparent to a.
1 Principles of Database Systems With Internet and Java Applications Today’s Topic Chapter 7: SQL, the Structured Query Language Instructor’s name and.
CIS 375—Web App Dev II SQL. 2 Introduction SQL (Structured _______ Language) is an ANSI standard language for accessing databases.ANSI SQL can execute.
SQL Jan 20,2014. DBMS Stores data as records, tables etc. Accepts data and stores that data for later use Uses query languages for searching, sorting,
MIS2502: Data Analytics SQL – Putting Information Into a Database David Schuff
1 All Powder Board and Ski Microsoft Access Workbook Chapter 5: Advanced Queries Jerry Post Copyright © 2003.
CMPT 258 Database Systems Midterm Review. Regarding the Exam Oct 15 Thursday Close book Cheat sheet (1 side of an A4 paper)
SQL Exercises – Part I April
Class11 Introduction to relational databases and MySQL MIS 3501, Fall 2015 Brad Greenwood, PhD MBA Department of MIS Fox School of Business Temple University.
Component 4: Introduction to Information and Computer Science Unit 6: Databases and SQL Lecture 6 This material was developed by Oregon Health & Science.
WEEK# 12 Haifa Abulaiha November 02,
Distribution of Marks For Second Semester Internal Sessional Evaluation External Evaluation Assignment /Project QuizzesClass Attendance Mid-Term Test Total.
Drill Consider the following tables with the following fields: Student: FName, LName, StudentID, Age, Yr, Course Grades: ID, P1, P2, P3 1.Display the.
MIS2502: Data Analytics SQL – Getting Information Out of a Database.
Manipulating Data Lesson 3. Objectives Queries The SELECT query to retrieve or extract data from one table, how to retrieve or extract data by using.
Exam 2 Review: SQL In, Dimensional Modeling, Pivot Tables, ETL Describe data cube elements Understand facts, dimensions, granularity Create/read a Star.
Understand Data Definition Language (DDL) Database Administration Fundamentals LESSON 1.4.
 MySQL  DDL ◦ Create ◦ Alter  DML ◦ Insert ◦ Select ◦ Update ◦ Delete  DDL(again) ◦ Drop ◦ Truncate.
Module 9: Implementing Functions. Overview Creating and Using Functions Working with Functions Controlling Execution Context.
Lec-7. The IN Operator The IN operator allows you to specify multiple values in a WHERE clause. SQL IN Syntax SELECT column_name(s) FROM table_name WHERE.
Order Database – ER Diagram
How to: SQL By: Sam Loch.
© 2016, Mike Murach & Associates, Inc.
MIS2502: Data Analytics SQL – Putting Information Into a Database
Structured Query Language (SQL)
All Powder Board and Ski
MIS2502: Data Analytics SQL – Putting Information Into a Database
SQL Data Modification Statements.
Lecturer: Mukhtar Mohamed Ali “Hakaale”
MIS2502: Data Analytics SQL – Getting Information Out of a Database
MIS2502: Data Analytics SQL – Putting Information Into a Database
MIS2502: Review for Exam 1 JaeHwuen Jung
MIS2502: Data Analytics SQL – Getting Information Out of a Database Part 2: Advanced Queries Aaron Zhi Cheng
RELATIONAL DATABASES AND XML
Exam 2 Exam 2 Study Guide is posted on the Course Site
MIS2502: Data Analytics SQL – Putting Information Into a Database
MIS2502: Data Analytics SQL – Putting Information Into a Database
Using CASE Value expression
MIS2502: Data Analytics SQL – Putting Information Into a Database
Advanced Joins IN ( ) Expression Subqueries with IN ( ) Expression
MIS2502: Data Analytics SQL 4– Putting Information Into a Database
Advanced SQL BCHB697.
MIS2502: Data Analytics SQL – Getting Information Out of a Database Part 2: Advanced Queries Zhe (Joe) Deng
Assignment: SQL #2 Putting Information into a Database
Manipulating Data Lesson 3.
កម្មវិធីបង្រៀន SQL Programming ជាភាសាខ្មែរ Online SQL Training Course
SQL NOT NULL Constraint
SQL AUTO INCREMENT Field
Presentation transcript:

Exam 2 Review

SQL – Create Table REMEMBER!! – Create table mxws.Contact ( ContactID INT(10) NOT NULL,.., primary key (contactID));

Insert into mxws.employee (EmployeeID,FirstName,LastName,Phone, ) VALUES (1001,'Lesley','Bland','

Update mxws.employee Set Phone=' ' WHERE EmployeeID = 1001; DELETE FROM m0ws.`Contact-Employee` WHERE ContactEmployeeID=5003;

Joins Identify the tables from which you need information Identify the tables that lie in between these tables. You will need to join all these tables. Identify primary key-foreign key relationships to join these various tables.

Joins Which movies has Salma Nolte acted in? Which tables do you need information from?

Joins Which movies has Salma Nolte acted in? Which tables do you need information from? Which tables lie between the two tables? What are the primary key- foreign key relationships between these tables?

Joins Which movies has Salma Nolte acted in? Which tables do you need information from? Which tables lie between the two tables? What are the primary key- foreign key relationships between these tables? Select ………. From …….. Where………………………

Subselects What is wrong with this statement? SELECT MIN(price),ProductName FROM orderdb.Product;

Subselects What is wrong with this statement? SELECT MIN(price),ProductName FROM orderdb.Product; Select productname from orderdb.product Where price = (SELECT MIN(Price) FROM orderdb.Product);

Subselects What was the longest movie starring Salma Nolte? And how long is it? (Hint: Use a subselect statement with the MAX() function to return only the movie with the greatest length by Salma Nolte.)

Subselects What was the longest movie starring Salma Nolte? And how long is it? select max(length),first_name,last_name from moviedb.film,moviedb.film_actor,m oviedb.actor where film.film_id = film_actor.film_id and film_actor.actor_id = actor.actor_id and first_name = "Salma" and last_name = "Nolte";

Subselects What was the longest movie starring Salma Nolte? And how long is it? select length,first_name,last_name from moviedb.film,moviedb.film_actor,m oviedb.actor where film.film_id = film_actor.film_id and film_actor.actor_id = actor.actor_id and first_name = "Salma" and last_name = "Nolte" and length = (select max(length) from moviedb.film);