What is sql?.

Slides:



Advertisements
Similar presentations
Relational Algebra, Join and QBE Yong Choi School of Business CSUB, Bakersfield.
Advertisements

Chapter 3 : Relational Model
D ATABASE S YSTEMS I R ELATIONAL A LGEBRA. 22 R ELATIONAL Q UERY L ANGUAGES Query languages (QL): Allow manipulation and retrieval of data from a database.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Relational Algebra Chapter 4, Part A Modified by Donghui Zhang.
CMPT 354, Simon Fraser University, Fall 2008, Martin Ester 52 Database Systems I Relational Algebra.
By relieving the brain of all unnecessary work, a good notation sets it free to concentrate on more advanced problems, and, in effect, increases the mental.
Database Management Systems, R. Ramakrishnan and J. Gehrke1 Relational Algebra Chapter 4, Part A.
Rutgers University Relational Algebra 198:541 Rutgers University.
Relational Algebra Chapter 4 - part I. 2 Relational Query Languages  Query languages: Allow manipulation and retrieval of data from a database.  Relational.
Introduction. 
1 Relational Algebra and Calculus Chapter 4. 2 Relational Query Languages  Query languages: Allow manipulation and retrieval of data from a database.
Introduction to Accounting Information Systems
CSCE 520- Relational Data Model Lecture 2. Relational Data Model The following slides are reused by the permission of the author, J. Ullman, from the.
1 CS1368 Introduction* Relational Model, Schemas, SQL Semistructured Model, XML * The slides in this lecture are adapted from slides used in Standford's.
MIS 327 Database Management system 1 MIS 327: DBMS Dr. Monther Tarawneh Dr. Monther Tarawneh Week 2: Basic Concepts.
Database Management Systems, R. Ramakrishnan and J. Gehrke1 Relational Algebra.
1.1 CAS CS 460/660 Introduction to Database Systems Relational Algebra.
ICS 321 Fall 2011 The Relational Model of Data (i) Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 8/29/20111Lipyeow.
1 Relational Algebra Chapter 4, Sections 4.1 – 4.2.
Lu Chaojun, SJTU Relational Data Model 1. Lu Chaojun, SJTU What’s a Data Model? A notation (collection of conceptual tools) for describing data as seen.
IST 210 The Relational Language Todd S. Bacastow January 2004.
Database Management Systems, R. Ramakrishnan1 Relational Algebra Module 3, Lecture 1.
CSCE 520- Relational Data Model Lecture 2. Oracle login Login from the linux lab or ssh to one of the linux servers using your cse username and password.
Chapter 1: Introduction. 1.2 Database Management System (DBMS) DBMS contains information about a particular enterprise Collection of interrelated data.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Relational Algebra Chapter 4, Part A.
1 CS122A: Introduction to Data Management Lecture #7 Relational Algebra I Instructor: Chen Li.
Introduction to Databases & SQL Ahmet Sacan. What you’ll need Firefox, SQLite plugin Mirdb and Targetscan databases.
IT 5433 LM3 Relational Data Model. Learning Objectives: List the 5 properties of relations List the properties of a candidate key, primary key and foreign.
1. 2 Design of databases. E/R model (entity-relationship model) Relational model (tables) UML (unified modeling language) Database programming. SQL, Relational.
More SQL: Complex Queries, Triggers, Views, and Schema Modification
CPSC 603 Database Systems Lecturer: Laurie Webster II, Ph.D., P.E.
Database Systems: Design, Implementation, and Management Tenth Edition
CMPT 354 Database Systems I
NOSQL Data Models.
Fusion Tables.
Relational Data Model Lu Chaojun, SJTU.
Introduction to Databases
Datab ase Systems Week 1 by Zohaib Jan.
Database Introduction
CS422 Principles of Database Systems Course Overview
Relational Algebra Chapter 4 1.
Database Design and Programming
Single Table Queries in SQL
CS1222 Using Relational Databases and SQL
RELATIONAL DATABASE MODEL
Relational Algebra Chapter 4, Part A
Database Models Relational Model
Relational Algebra 461 The slides for this text are organized into chapters. This lecture covers relational algebra, from Chapter 4. The relational calculus.
What is database? Types and Examples
Database.
Chapter 4 The Relational Model Pearson Education © 2009.
The Relational Model Relational Data Model
Chapter 4 The Relational Model Pearson Education © 2009.
Relational Algebra 1.
Relational Databases The Relational Model.
Relational Databases The Relational Model.
Relational Algebra Chapter 4 1.
Relational Algebra Chapter 4, Sections 4.1 – 4.2
More SQL: Complex Queries, Triggers, Views, and Schema Modification
How to Use SNAP Queries in HQ BOA
The Relational Model Transparencies
CMPT 354: Database System I
Database Management Systems CSE594
Chapter 1 Database Concepts.
Why Study Databases? Databases have incredible value to businesses.
Chen Li Information and Computer Science
The Relational Data Model
CENG 351 File Structures and Data Managemnet
CE223 Database Systems Introduction
Presentation transcript:

What is sql?

Databases In the past, databases mostly held boring stuff: census data, employee records, bank accounts, … Today, databases hold virtually all of humankind’s collected information Everything you’ve ever read, seen (or done according to Snowden) Everything on the web (cat pictures) Scientific data (mostly LHC stuff) Medical data and so on Corny art from: https://www.flickr.com/photos/datacorpltd/19556451409

Databases are interesting Databases use restricted programming languages One of the few places where non-Turing-complete languages are an advantage This leads to very terse programming and deep query-optimization problems Concurrency and Transactions are essential Many activities happen simultaneously Need to heavily utilize parallel programming techniques

What is the advantage to SQL not being Turing-Complete? Easier to optimize Easier to write Lies! SQL is Turing-complete I don't know what Turing-complete is

Data Models - Components Mathematical representation of the data Relational Models (CSV) = tables Semi-structured Models (XML, JSON) = trees/graphs Operations on data (what is allowed, i.e. comparisons, equality, math) Constraints (what types of data are allowed, and where)

Attributes (column headers) Relations are tables Attributes (column headers) name FavoriteShow Ian Stargate SG1 Cam True Detective Caleb GLTAS maybe Tuples (rows) Relation name shows

Schemas (sound familiar?) Relation schema = relation name and attribute list Optionally: types of attributes Example: shows (name, FavoriteShow) or shows (name TEXT, FavoriteShow TEXT) Database = collection of relations Database schema = set of all relation schemas in the database

Why Relations? Very simple model Often (but not always) matches how we think about data Abstract model that underlies SQL, the most important database language today

Database Schemas in SQL SQL is primarily a query language, for getting information from a database. But SQL also includes a data-definition component for describing database schemas.

What is the difference between: Record, tuple, and row Nothing (in the context of this class) The way they are spelled How insulting they are Whether the order of the elements matter