…and how to do stuff with them Copyright © The University of Southampton 2011 This work is licensed under the Creative Commons Attribution License See.

Slides:



Advertisements
Similar presentations
Query Methods (SQL). What is SQL A programming language for databases. SQL (structured Query Language) It allows you add, edit, delete and run queries.
Advertisements

Introduction to Structured Query Language (SQL)
Chapter Information Systems Database Management.
Introduction to Access. What is Access? Database tool Creates a database Good data query (lookup and analysis) ability Good entry forms Good reports Multi-user.
Introduction to Structured Query Language (SQL)
A Guide to SQL, Seventh Edition. Objectives Understand the concepts and terminology associated with relational databases Create and run SQL commands in.
Introduction to Structured Query Language (SQL)
CSC 2720 Building Web Applications Database and SQL.
Mary K. Olson PS Reporting Instance – Query Tool 101.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
Confidential ODBC May 7, Features What is ODBC? Why Create an ODBC Driver for Rochade? How do we Expose Rochade as Relational Transformation.
State of Connecticut Core-CT Project Query 4 hrs Updated 1/21/2011.
Session 5: Working with MySQL iNET Academy Open Source Web Development.
CPS120: Introduction to Computer Science Information Systems: Database Management Nell Dale John Lewis.
Introduction –All information systems create, read, update and delete data. This data is stored in files and databases. Files are collections of similar.
PHP Programming with MySQL Slide 8-1 CHAPTER 8 Working with Databases and MySQL.
Self Guided Tour for Query V8.4 Basic Features. 2 This Self Guided Tour is meant as a review only for Query V8.4 Basic Features and not as a substitute.
© Paradigm Publishing Inc. 9-1 Chapter 9 Database and Information Management.
Concepts of Database Management Seventh Edition
1 Overview of Databases. 2 Content Databases Example: Access Structure Query language (SQL)
1 INTRODUCTION TO DATABASE MANAGEMENT SYSTEM L E C T U R E
Python MySQL Database Access
Introduction to Microsoft Access Overview 1. Introduction What is Access? A relational database management system What is a Relational Database? Organized.
© Paradigm Publishing Inc. 9-1 Chapter 9 Database and Information Management.
Introduction to databases and SQL. What is a database?  A database is an organized way of holding together pieces of information  A database refers.
Chapter 7 Working with Databases and MySQL PHP Programming with MySQL 2 nd Edition.
Unit 23 Database and Spreadsheets Prepared by :Nahed Al-Salah.
MET280: Computing for Bioinformatics Introduction to databases What is a database? Not a spreadsheet. Data types and uses DBMS (DataBase Management System)
NMED 3850 A Advanced Online Design January 12, 2010 V. Mahadevan.
CPS120: Introduction to Computer Science Lecture 19 Introduction to SQL.
Concepts of Database Management Seventh Edition
Using Special Operators (LIKE and IN)
Concepts of Database Management Seventh Edition
7 1 Chapter 7 Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
6 1 Lecture 8: Introduction to Structured Query Language (SQL) J. S. Chou, P.E., Ph.D.
Copyright 2008 McGraw-Hill Ryerson 1 TECHNOLOGY PLUG-IN T7 PROBLEM SOLVING USING ACCESS.
Database Management Systems.  Database management system (DBMS)  Store large collections of data  Organize the data  Becomes a data storage system.
Oracle & SQL Introduction. Database Concepts Revision DB? DBMS? DB Application? Application Programs? DBS? Examples of DBS? Examples of DBMS? 2Oracle.
1 DBS201: Introduction to Structure Query Language (SQL) Lecture 1.
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.
1 Ch. 1: Sharing Knowledge and Success  Oracle is an Object-Relational Database (ORDBMS).  RDBMS allows you to put the data in, keep the data, get it.
Database Concepts Track 3: Managing Information using Database.
Chapter 13 Views Oracle 10g: SQL. Oracle 10g: SQL2 Objectives Create a view, using CREATE VIEW command or the CREATE OR REPLACE VIEW command Employ the.
T7-1 LEARNING OUTCOMES – ACCESS PROBLEM SOLVING 1.Describe the process of using the Simple Query Wizard using Access 2.Describe the process of using the.
DAY 21: MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Aliya Farheen October 29,2015.
Principles of Database Design, Part I AIMS 2710 R. Nakatsu.
Android - SQLite Database 12/10/2015. Introduction SQLite is a opensource SQL database that stores data to a text file on a device. Android comes in with.
CS 111 – Nov. 8 Databases Database Management Systems (DBMS) Structured Query Language (SQL) Commitment –Please review sections 9.1 – 9.2.
CPSC 203 Introduction to Computers T97 By Jie (Jeff) Gao.
1 A Very Brief Introduction to Relational Databases.
7 1 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 7.6 Advanced Select Queries SQL provides useful functions that.
LM 5 Introduction to SQL MISM 4135 Instructor: Dr. Lei Li.
MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Sravanthi Lakkimsety Mar 14,2016.
COMP234 – Perl SQL. SQL Syntax Keywords upper case: CREATE TABLE English like syntax Multi-word verbs –INSERT INTO Parentheses and other syntactical guides.
Introduction to Database Programming with Python Gary Stewart
Chapter 12 Introducing Databases. Objectives What a database is and which databases are typically used with ASP.NET pages What SQL is, how it looks, and.
Web Systems & Technologies
Exploring Excel Chapter 5 List and Data Management: Converting Data to
Plug-In T7: Problem Solving Using Access 2007
SQL in Oracle.
Database Management  .
Chapter 8 Working with Databases and MySQL
Introduction To Structured Query Language (SQL)
Spreadsheets, Modelling & Databases
CS1222 Using Relational Databases and SQL
CS1222 Using Relational Databases and SQL
Charles Severance Single Table SQL.
CS1222 Using Relational Databases and SQL
CS1222 Using Relational Databases and SQL
Presentation transcript:

…and how to do stuff with them Copyright © The University of Southampton 2011 This work is licensed under the Creative Commons Attribution License See for more information. Introduction to Databases

DatabasesIntroduction to Databases Preparation Check Install Firefox – Install SQLite from Tools -> Add ons Run sqlite3 from command line (check you get a sqlite> prompt, Control-D to exit) Download our example database: carpentry.org/experiments.db

DatabasesIntroduction to Databases What is a Database? A database is a way to store and manipulate information that is arranged as tables Each table has - Columns (fields) which describe the data - Rows (records) which contain the data Databases often confused with DBMS’ (DataBase Management System) - Manage and provide access to data in a database

DatabasesIntroduction to Databases Speaking Database: SQL In a spreadsheet, you insert formulas or new sheets to analyse your data In a database, you give commands, also known as Queries The database does the analysis your query specifies, and returns the results in a tabular form Queries are written in a simple, english-like, language called SQL (“Structured Query Language”)

DatabasesIntroduction to Databases Dataflow: The building blocks of queries SQL is a vast language that provides all sorts of ways of mixing and remixing your data Each operation extracts or transforms data from a previous operation, to form a pipeline or flow of data that ends with the results you get back We’ll be giving you practical experience with a core set of SQL – probably around 80% of all queries you’ll ever do

DatabasesIntroduction to Databases SQLite Production-level DBMS’ like Oracle and Postgres are complicated The concepts we’ll show you are the same and can be applied to these databases - Preventing implementation detail getting in the way SQLite allows us to contain a separate database within a single file - Great for sending databases to others; not so easy with other DBMS’! - SQLite slower for huge databases than Oracle, etc.

DatabasesIntroduction to Databases …

DatabasesIntroduction to Databases Exercise 1 Find out those people that have the last name Pavlov or Sakharov, with the results in ascending order of their login id

DatabasesIntroduction to Databases Exercise 2 Devise a query to: Get all experiments where number of those involved > 1 Order results in ascending order by experiment id

DatabasesIntroduction to Databases Exercise 3 Devise a query to: give a total number of hours for experiments that have more than 4 hours registered… …but don’t have an experiment id of 1

DatabasesIntroduction to Databases Exercise 4 select distinct Project.ProjectName, Involved.Login from Project join Involved where Project.ProjectID=Involved.ProjectID; Extend the above query to also retrieve the last name of the person Hint: there’s a table we’ve already looked at that contains this information Bigger hint: you’ll need to do another ‘join’, increase the ‘select’ filtering and use an additional ‘where’

DatabasesIntroduction to Databases Exercise 5 – the biggie Devise query to return one table that shows: Project Name | Person Last Name | Experiment Id | Hours Worked