Introduction to SQL Exercises. Exercise 1 Suppose we have data on: – Animal name – Type (eg: bird, fish, mammal) – Speed (kph/mph) – Speed types(eg.

Slides:



Advertisements
Similar presentations
Do the Loco-motion Hear songwriter Carole King singing the title song in concert:
Advertisements

Introduction to ReportSmith and Effective Dated Tables
Working with Tables 1 of 5. Working with Tables 2 of 5.
Query Methods (SQL). What is SQL A programming language for databases. SQL (structured Query Language) It allows you add, edit, delete and run queries.
Updating Databases With Open SQL
Murach’s Java SE 6, C21© 2007, Mike Murach & Associates, Inc.Slide 1.
Some Introductory Programming 1. Structured Query Language (SQL) - used for queries. - a standard database product. 2. Visual Basic for Applications -
Aerodynamics of Flight By: Himani and Zachery. Peregrine falcons are the fastest birds. They fly 100 mph while flying level. They can dive up to 200 mph.
Wing Span:. Peregrine falcons are one of the swiftest flyers.. Peregrine falcons have a wingspan of 37 to 40 inches.. A Male’s wingspan is on the smaller.
By: Noah Peregrine Falcon. Scientific Name: Peregrinus.
Warm Up # of sig figs x103 AP Physics Tuesday Standards: Kinematics 1D & 2D: Big Idea 3 Learning Objective: SWBAT.
INTRODUCTION The Group WEB BROWSER FOR RELATION Goals.
Introduction to Structured Query Language SQL. SQL Select Command SELECT * FROM tableName WHERE criteria;
Chapter 08 How to Insert, Update, and Delete Data MIT 22033, Database Management Systems By. S. Sabraz Nawaz.
Jennifer Widom SQL Data Modification Statements. Jennifer Widom Insert Into Table Values(A 1,A 2,…,A n ) SQL: Modifications Inserting new data (2 methods)
Exercise – Bird Count Database TablesFields Species Species_ID, Common Name LocationHabitat, Coordinates VisitTime, Weather, Date SurveyMinute, species,
Agenda Journalling More Embedded SQL. Journalling.
5 Minute Check Write each percent as a decimal. Complete in your notebook % 2. 15% 3. 4% Write each percent as a fraction %
Introduction –All information systems create, read, update and delete data. This data is stored in files and databases. Files are collections of similar.
Appendix B© copyright Janson Industries SQL ▮ Explain basic SQL concepts ▮ Demonstrate SQL commands ▮ Results Sets.
 A databases is a collection of data organized to make it easy to search and easy to retrieve in a useful, usable form.
Python MySQL Database Access
Fastest Woman Skier by Ms. Kitt. The highest recorded speed by a female skier is km/h ( mph) by Sanna Tidstrand (Sweeden) at Les Arcs, France.
There are many kinds of animals. Animals can be put into groups based upon their characteristics. Some animals do not have backbones.
More about Databases. Data Entry through Forms Table View (Data sheet view) is useful for data entry of new records But sometimes customization would.
DDT Zachary Rolling Hills Elementary Dichloro-diphenyl-thrichlorethane [DDT], was, is, and always will be a dangerous insecticide that has killed.
Tutorial 6 SQL Muhammad Sulayman
Chapter 9 Query-by-Example Pearson Education © 2009.
SQL introduction. RHS – SOC 2 Getting data out of databases Databases are ”just” containers of data We could – in principle – just put data in a text.
CS 1308 Computer Literacy and the Internet
What have we learned?. What is a database? An organized collection of related data.
Chapter 9 The Microsoft Access 2007 Window © 2007 Lawrenceville Press Slide 1.
CIS 375—Web App Dev II SQL. 2 Introduction SQL (Structured _______ Language) is an ANSI standard language for accessing databases.ANSI SQL can execute.
Animal Groups Your Name.
Course FAQ’s I do not have any knowledge on SQL concepts or Database Testing. Will this course helps me to get through all the concepts? What kind of.
Ch6. Introduction to Database. What is a Database? Database is a collection of related information. It is organized so that it can easily be accessed,
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 introduction. SWC Getting data out of databases Databases are ”just” containers of data We could – in principle – just put data in a text.
Database Management System. DBMS A software package that allows users to create, retrieve and modify databases. A database is a collection of related.
MIST System Management Reviewing and further understanding systems management - using “MIST 2006 Data Cleaning Tools” - running a “tight” system - data.
Living things Non-living things.
Advanced Databases More Advanced PL/SQL Programing 1.
Chapter 3: Relational Databases
Speed does not usually stay constant. That is to say, speed can and does change.
Motion Mrs. Gonzales MFMS. What is it? In your own words, define what you think MOTION is: _______________________________ How do we know when something.
Geographic Information Systems GIS Data Databases.
1 Database Systems Introduction to Microsoft Access Part 1.
CS SQL.
Chapter 12 Information Systems.
Introduction to Relational Databases
DBM 380(NEW) Education on your terms/tutorialrank.com.
DBM 380 HELP Perfect Education/ dbm380help.com.
PHP-language, database-programming
SQL Data Modification Statements.
Workbench Data Definition Language (DDL)
More about Databases.
مقدمة في قواعد البيانات
Database Design and Development
This allows me to insert data for specified fields and not for other fields in the structure.
Warm Up Problem At baseball practice, Neil caught 23 out of 25 hits in the outfield. Which of the following is not another way of expressing 23 out of.
Database Design and Development
Database Design and Development
Creating and Managing Database Tables
Introduction to Databases
Chapter 9 Query-by-Example Pearson Education © 2009.
BUS2206 Access Lab Queries Second Term,
Data Access Layer (Con’t) (Overview)
Updating Databases With Open SQL
Updating Databases With Open SQL
Geographic Information Systems
Presentation transcript:

Introduction to SQL Exercises

Exercise 1 Suppose we have data on: – Animal name – Type (eg: bird, fish, mammal) – Speed (kph/mph) – Speed types(eg running, swimming, flying, diving etc) Give a relational database schema for a database with this information

Exercise 2 Write the SQL to create tables for: – animalType(typeID, description) – speedType(typeID, description) – animal(name, animalType) – animalSpeed(animalName, speedType, topSpeed)

Exercise 3 Write the SQL to: – Insert a speedType with typeID of 1 and description running – Insert a speedType with a typeID of 2 and description diving – Insert an animalSpeed for a running cheetah of 112kph – Insert an animalSpeed for a diving peregrine falcon of 387.2kph

Exercise 4 Write the SQL to: – Update the animalSpeed of the cheetah to 113kph – Delete the animalSpeed entry for the peregrine falcon

Exercise 5 Write the SQL to: – Select all records and fields from the speedType table – Select all animalNames from the animal table – Select all entries for peregrine falcons from the animalSpeed table – Select all entries for diving peregrine falcons from the animalSpeed table