Using Relational Databases and SQL Steven Emory Department of Computer Science California State University, Los Angeles Lecture 1: Introduction to Relational.

Slides:



Advertisements
Similar presentations
Databases MMG508. DB Properties  Definition of a database: “A database is a collection of interrelated data items that are managed as a single unit”
Advertisements

Data Modeling and Database Design Chapter 1: Database Systems: Architecture and Components.
Database Processing: Fundamentals, Design and Implementation, 9/e by David M. KroenkeChapter 1/1 Copyright © 2004 Please……. No Food Or Drink in the class.
CIT 613: Relational Database Development using SQL Introduction to SQL.
Using Relational Databases and SQL John Hurley Department of Computer Science California State University, Los Angeles Lecture 1 Introduction.
History of Database Systems History of Database Systems File systems (before mid 1960s) Problems: Data redundancy update anomalies no abstract data model.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 1-1 David M. Kroenke’s Chapter One: Introduction Part One Database Processing:
Using Relational Databases and SQL Steven Emory Department of Computer Science California State University, Los Angeles Laboratory 1: Introduction to Relational.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 1.
Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database Processing.
Chapter 3: SQL – Part I Yong Choi School of Business CSU, Bakersfield.
Data Base Management System
DBMS1 Database Management System (DBMS) Introductory Concepts Week-1.
Database Management COP4540, SCS, FIU An Introduction to database system.
SQL – Part I Yong Choi School of Business CSU, Bakersfield.
Phil Brewster  One of the first steps – identify the proper data types  Decide how data (in columns) should be stored and used.
Introduction To Databases IDIA 618 Fall 2014 Bridget M. Blodgett.
Database Design and Introduction to SQL
Dale Roberts 1 Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
Database System Concepts and Architecture Lecture # 3 22 June 2012 National University of Computer and Emerging Sciences.
Information storage: Introduction of database 10/7/2004 Xiangming Mu.
Introduction to SQL Yong Choi School of Business CSU, Bakersfield.
CS370 Spring 2007 CS 370 Database Systems Lecture 2 Overview of Database Systems.
Module Title? DBMS Introduction to Database Management System.
Course Introduction Introduction to Databases Instructor: Joe Bockhorst University of Wisconsin - Milwaukee.
Web-Enabled Decision Support Systems
1 CS 430 Database Theory Winter 2005 Lecture 1: Introduction.
1 DATABASES & DATABASE MANAGEMENT SYSTEMS (DBMS). MS ACCESS What is a database Database terms DB constructing stages DB models Relational model Normal.
STORING ORGANIZATIONAL INFORMATION— DATABASES CIS 429—Chapter 7.
1 INTRODUCTION TO DATABASE MANAGEMENT SYSTEM L E C T U R E
Introduction to Database Systems
CS 474 Database Design and Application Terminology Jan 11, 2000.
Introduction to Database Management. 1-2 Outline  Database characteristics  DBMS features  Architectures  Organizational roles.
10/16/2015 1Yan Huang - Introduction Chapter 1: Introduction What is a DBMS? What is a DBMS? A little history of DB A little history of DB Major Components.
Lecture2: Database Environment Prepared by L. Nouf Almujally & Aisha AlArfaj 1 Ref. Chapter2 College of Computer and Information Sciences - Information.
“INTRODUCTION TO DATABASE AND SQL”. Outlines 2  Introduction To Database  Database Concepts  Database Properties  What is Database Management System.
MIS 327 Database Management system 1 MIS 327: DBMS Dr. Monther Tarawneh Dr. Monther Tarawneh Week 2: Basic Concepts.
Lecture2: Database Environment Prepared by L. Nouf Almujally 1 Ref. Chapter2 Lecture2.
1 CS 430 Database Theory Winter 2005 Lecture 2: General Concepts.
Prepared By Prepared By : VINAY ALEXANDER ( विनय अलेक्सजेंड़र ) PGT(CS),KV JHAGRAKHAND.
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.
Visual Programing SQL Overview Section 1.
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,
Introduction to Databases Three File Processing Systems DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 1-2.
Database Systems Lecture 1. In this Lecture Course Information Databases and Database Systems Some History The Relational Model.
CIT 613: Relational Database Development using SQL Introduction to SQL DeSiaMorePowered by DeSiaMore 1.
SQL Introduction to database and SQL. Chapter 1: Databases and Database Users 6 Introduction to Databases Databases touch all aspects of our lives. Examples:
Chapter 1: Introduction. 1.2 Database Management System (DBMS) DBMS contains information about a particular enterprise Collection of interrelated data.
Introduction to Core Database Concepts Getting started with Databases and Structure Query Language (SQL)
CS 122: Using Relational Databases and SQL Tarik Booker Department of Computer Science California State University, Los Angeles.
1 Section 1 - Introduction to SQL u SQL is an abbreviation for Structured Query Language. u It is generally pronounced “Sequel” u SQL is a unified language.
Introduction to Database Programming with Python Gary Stewart
Data Resource Management Data Concepts Database Management Types of Databases Chapter 5 McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies,
Fundamental of Database Systems
Using Relational Databases and SQL
“Introduction To Database and SQL”
An Introduction to database system
Database Management System
CS1222 Using Relational Databases and SQL
Lecture 1 Introduction to Database
Tools for Memory: Database Management Systems
“Introduction To Database and SQL”
Data Base System Lecture 2: Introduction to Database
Database.
CS1222 Using Relational Databases and SQL
CS1222 Using Relational Databases and SQL
CS1222 Using Relational Databases and SQL
CS1222 Using Relational Databases and SQL
CS1222 Using Relational Databases and SQL
Presentation transcript:

Using Relational Databases and SQL Steven Emory Department of Computer Science California State University, Los Angeles Lecture 1: Introduction to Relational Databases and MySQL

Database Origin Database comes from the open compound word “Data Base” Data Base was a military term (circa 1964) Data Base implies data that is both persistent and shared (think Air Force Base) The military funded much of the research into the early electronic computers of the 40’s and 50’s because of World War II and the Korean War

What is a Database? A structured collection of persistent data that is typically meant to be shared Used to model organizational activities Structure is defined through a database model No database model, no database! Examples: Airlines, Banks, Stores and Universities

Database Models The Two Levels of a Database Model Physical Level (how data is stored)‏ The things we don’t care about Logical Level (how data is generalized)‏ The things we do care about The Basic Models Hierarchical Model‏ (IBM’s IMS) Network Model (CODASYL)‏ Relational Model (ALPHA, SEQUEL)‏

Physical/Logical Separation Previous to the relational model, one had to write a program that traversed pointers at the physical level to extract data from a database (think like programming in assembly language) By abstracting the physical level and writing a program at the logical level instead (think like programming in Java), extracting data from a database became easier First proposed by Dr. Edgar Frank Codd.

Dr. Edgar F(rank) Codd MA Mathematics, MA Chemistry MS and PhD in Communication Sciences ACM Turing Award (1981)

Relational Model Proposed by Edgar F. Codd (circa 1969)‏ Database is a collection of tables (relations) Relational comes from ‘Relational Algebra/Calculus’ and not from ‘Relationships’ Relational model is very mathematical Dominant database model Thanks to Larry Ellison, founder of Oracle, who was first to aggressively market a commercial relational database product (Ellison is currently the 4 th richest person in the world)

Tables‏ Artists = Table (Relation)‏ ArtistID, City, Region,... = Columns (Attributes)‏ Each row is called a Record (Tuple)‏

Data Types‏ Determines storage requirements Common attribute types String Numeric (float, double, real)‏ Date and Time Blobs and Clobs (images and other binary data)‏

Database Schemas The definition of the database, where you define The name of the database Tables Column names, types, and constraints Relationships between tables Stored functions and procedures Schemas are typically represented by a schema diagram

Database Schemas

Database Management Systems (DBMS)‏ Software (programs) to manage databases Creation/Deletion Maintenance (inserting, updating‏, and deleting records) Security (encryption, user access control)‏ Common DBMSs MySQL, PostreSQL (open source)‏ Oracle, DB2, MS SQL Server (commercial)‏

Database Management Systems (DBMS) You can have multiple databases, each with a single schema A separate database for each application Toystore (First database) Bookstore (Second database) Furniture Store (Third database) Etc. You can also have a single database, with multiple schemas

DBMS Diagram

Query Languages Query Language = A language used to extract data from a database Domain-Specific Language Only for databases History Codd, Alpha (1971)‏ Chamberlin and Boyce, SEQUEL (1974)‏ Eventually renamed to SQL

QL Examples Alpha (Codd) SEQUEL (Chamberlin, Boyce)‏

SQL Stands for Structured Query Language A non-procedural, domain-specific language (not like C or C++)‏ An open ANSI standard Supported by most major DBMS Some variations in implementations Used by programmers, managers, and database administrators

SQL Functions View information from relational databases Single and multiple table selections Calculation and analysis Manipulate information in relational databases Insert and delete records Update records Create relational databases Create databases, tables, constraints,...

Other Interesting Facts Question: Why is a database always represented by an aluminum can or some type of cylinder?

Other Interesting Facts Answer: Because that’s what disk storage looked like back in the old days!

Other Interesting Facts Since IBM already had a database product called IMS, which was currently being used in the Apollo space program (1969 – 1972), Dr. Codd was asked by IBM not to disparage IMS nor promote his model over IMS since it might hurt sales of IMS. Many people to this day believe that hindered IBM and Dr. Codd from making all the money that Larry Ellison of Oracle has made.

Downloading MySQL Go to CS122 Wiki page and under the Required Software section, click on the links to MySQLMySQL (client and server program) MySQL GUI Tools MySQL GUI Tools (alternative client program) MySQL Workbench MySQL Workbench (schema utility) Download the versions for Windows, without the installer Extract all three to a flash drive (preferably)

Important Notes!!! You can put MySQL directly onto these computers, but be aware that other students may delete your stuff (by accident or otherwise) Do not leave homework, labs, or programs on our computers as other students may find and mishandle your stuff Always back up your work onto a personal flash drive before you leave Don’t forget your flash drives