SqlExam1Review.ppt EXAM - 1. SQL stands for -- Structured Query Language Putting a manual database on a computer ensures? Data is more current Data is.

Slides:



Advertisements
Similar presentations
What is a Database By: Cristian Dubon.
Advertisements

Relational Algebra, Join and QBE Yong Choi School of Business CSUB, Bakersfield.
Concepts of Database Management Sixth Edition
Concepts of Database Management Seventh Edition
Database Systems: Design, Implementation, and Management Tenth Edition
Introduction to Structured Query Language (SQL)
Introduction to Structured Query Language (SQL)
Nov 24, 2003Murali Mani SQL B term 2004: lecture 12.
Slides adapted from A. Silberschatz et al. Database System Concepts, 5th Ed. SQL - part 2 - Database Management Systems I Alex Coman, Winter 2006.
Concepts of Database Management, 4th Edition, Pratt & Adamski
Introduction to Structured Query Language (SQL)
1 Chapter 2 Reviewing Tables and Queries. 2 Chapter Objectives Identify the steps required to develop an Access application Specify the characteristics.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 7 Introduction to Structured Query Language (SQL)
Concepts of Database Management Sixth Edition
A Guide to SQL, Seventh Edition. Objectives Retrieve data from a database using SQL commands Use compound conditions Use computed columns Use the SQL.
Microsoft Access 2010 Chapter 7 Using SQL.
INFORMATION TECHNOLOGY IN BUSINESS AND SOCIETY SESSION 16 – SQL SEAN J. TAYLOR.
Introduction to SQL J.-S. Chou Assistant Professor.
Concepts of Database Management, Fifth Edition
SQL 資料庫查詢語言 取材自 EIS, 3 rd edition By Dunn et al..
Chapter 3 Single-Table Queries
Microsoft Access 2010 Chapter 7 Using SQL. Change the font or font size for SQL queries Create SQL queries Include fields in SQL queries Include simple.
AL-MAAREFA COLLEGE FOR SCIENCE AND TECHNOLOGY INFO 232: DATABASE SYSTEMS CHAPTER 7 INTRODUCTION TO STRUCTURED QUERY LANGUAGE (SQL) Instructor Ms. Arwa.
Component 4/Unit 6f Topic VI: Create simple querying statements for the database The SELECT statement Clauses Functions Joins Subqueries Data manipulation.
1 CS 430 Database Theory Winter 2005 Lecture 12: SQL DML - SELECT.
SQL: Data Manipulation Presented by Mary Choi For CS157B Dr. Sin Min Lee.
1 Single Table Queries. 2 Objectives  SELECT, WHERE  AND / OR / NOT conditions  Computed columns  LIKE, IN, BETWEEN operators  ORDER BY, GROUP BY,
Concepts of Database Management Seventh Edition
Using Special Operators (LIKE and IN)
Concepts of Database Management Seventh Edition
Oracle DML Dr. Bernard Chen Ph.D. University of Central Arkansas.
6 1 Lecture 8: Introduction to Structured Query Language (SQL) J. S. Chou, P.E., Ph.D.
1 Multiple Table Queries. 2 Objectives  Retrieve data from more than one table by joining tables  Using IN and EXISTS to query multiple tables  Nested.
Concepts of Database Management Eighth Edition Chapter 3 The Relational Model 2: SQL.
Database Fundamental & Design by A.Surasit Samaisut Copyrights : All Rights Reserved.
SQL LANGUAGE and Relational Data Model TUTORIAL Prof: Dr. Shu-Ching Chen TA: Hsin-Yu Ha.
5. Simple SQL using Oracle1 Simple SQL using Oracle 5. Working with Tables: Data management and Retrieval 6. Working with Tables: Functions and Grouping.
DATA RETRIEVAL WITH SQL Goal: To issue a database query using the SELECT command.
AL-MAAREFA COLLEGE FOR SCIENCE AND TECHNOLOGY INFO 232: DATABASE SYSTEMS CHAPTER 7 (Part II) INTRODUCTION TO STRUCTURED QUERY LANGUAGE (SQL) Instructor.
Database Management Supplement 1. 2 I. The Hierarchy of Data Database File (Entity, Table) Record (info for a specific entity, Row) Field (Attribute,
Concepts of Database Management Seventh Edition Chapter 3 The Relational Model 2: SQL.
1/18/00CSE 711 data mining1 What is SQL? Query language for structural databases (esp. RDB) Structured Query Language Originated from Sequel 2 by Chamberlin.
1 2 Concepts of Database Management, 4 th Edition, Pratt & Adamski Chapter 2 The Relational Model 1: Introduction, QBE, and Relational Algebra.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 6 The Relational Algebra and Relational Calculus.
Component 4: Introduction to Information and Computer Science Unit 6: Databases and SQL Lecture 6 This material was developed by Oregon Health & Science.
A Guide to SQL, Eighth Edition Chapter Four Single-Table Queries.
1 SQL: The Query Language. 2 Example Instances R1 S1 S2 v We will use these instances of the Sailors and Reserves relations in our examples. v If the.
1 Chapter 3 Single Table Queries. 2 Simple Queries Query - a question represented in a way that the DBMS can understand Basic format SELECT-FROM Optional.
7 1 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 7.6 Advanced Select Queries SQL provides useful functions that.
1 SQL Chapter 9 – 8 th edition With help from Chapter 2 – 10 th edition.
SQL LANGUAGE TUTORIAL Prof: Dr. Shu-Ching Chen TA: Hsin-Yu Ha.
Database Systems, 8 th Edition SQL Performance Tuning Evaluated from client perspective –Most current relational DBMSs perform automatic query optimization.
LM 5 Introduction to SQL MISM 4135 Instructor: Dr. Lei Li.
Select Complex Queries Database Management Fundamentals LESSON 3.1b.
Concepts of Database Management, Fifth Edition Chapter 3: The Relational Model 2: SQL.
IFS180 Intro. to Data Management Chapter 10 - Unions.
More SQL: Complex Queries,
Structured Query Language
COP Introduction to Database Structures
Prepared by : Moshira M. Ali CS490 Coordinator Arab Open University
SQL Structured Query Language 11/9/2018 Introduction to Databases.
Prof: Dr. Shu-Ching Chen TA: Yimin Yang
Prof: Dr. Shu-Ching Chen TA: Hsin-Yu Ha
Chapter # 7 Introduction to Structured Query Language (SQL) Part II.
More SQL: Complex Queries, Triggers, Views, and Schema Modification
Prof: Dr. Shu-Ching Chen TA: Haiman Tian
CSCE 315 – Programming Studio Spring 2010 Project 1, Lecture 4
Structured Query Language
Contents Preface I Introduction Lesson Objectives I-2
Shelly Cashman: Microsoft Access 2016
Presentation transcript:

sqlExam1Review.ppt EXAM - 1

SQL stands for -- Structured Query Language Putting a manual database on a computer ensures? Data is more current Data is more accurate You can generate useful reports Timely & Accurate

Relational DBMS provides? - Ask questions of the database - Retrieve information from the database quickly - Find the answer to a question easily Before storing data in a database, you should know? Know what information you will maintain in the database The most basic form of an SQL statement is? SELECT FROMSELECT FROM WHERE

Each table in your database will normally have a(n) ____________ that uniquely identifies each _____________. Primary KeyRow/Record FACT!! Relational DBMS allows you to retrieve information from the database quickly!!! The phase that is needed in the SELECT command to restrict to picking particular rows? WHERE

You list the name of the table that contains the data to retrieve in the _________________ clause of the SELECT command. FROM Another name for AND, OR? BOOLEAN The =, >, are what type of operators? Relational Rapid system development process is also defined as? Prototyping Comparison operators

Operations for manipulating relations 1. Product 2. Union 3. Intersect (ion) 4. Difference Commutative Operations We match every row of relation A with every row of relation B Join all rows in both relations, removing duplicates Including only the rows that match your where clause Including only rows that do not match -- select all rows from first table that are NOT in the second table

II. Relational Algebra - continued C. Operations for manipulating relations 5. Selection 6. Projection 7. Join 8. Assignment Select only specific attributes (columns) Selects specific rows based on data values Using operators (=, >, etc..) to combine data from two or more relations Assign a new name to relations that are created as a result of a join, projection, selection, etc.

If you want to select all rows from a table, you do not need to use a ____________ in your SELECT command. WHERE If you want to select all columns from a table, you need to use a ____________ in your SELECT command. * WHERE SLSREP_NUMBER = '06' is an example of a _______________ condition. SIMPLE Wild card symbols that we have used are? * -- selects ALLcolumns % -- group of characters can be placed at the beginning or end of character (Used with the LIKE clause) _ -- represents any individual character

LIKE ?? -- operator lets you test a string value to see whether it contains certain characters The ___________ clause is used to sort output in a specific order. Order By IN ?? -- operator lets you test a field against a list of values. ALL ?? -- operator lets you use a relational operator against a subselect & determine whether the condition is true for ALL values in the list. ANY ?? -- operator lets you use a relational operator against a subselect to determine whether the condition is true for SOME values in the list. Sorting by multiple columns the least important column is called?

Functions AVG SUM COUNT MAX MIN Use the __________ operator to select a count of unique values. DISTINCT A query within a query is called a ______________________. Nested Query/SubQuery What is evaluated first in a subquery? Inner Query

GROUPING -- examples rows for all customers who have the same sales rep rows for all customers who have the same credit limit rows for all customers who have the same balance When rows are grouped there is one row of output for each group The condition to set a Column name to unknown is ___________. NULL Joining tables you must? From clause -- Where clause

Questions