CIT 613: Relational Database Development using SQL Introduction to SQL.

Slides:



Advertisements
Similar presentations
The Relational Model and Relational Algebra Nothing is so practical as a good theory Kurt Lewin, 1945.
Advertisements

ETEC 100 Information Technology
Database Management: Getting Data Together Chapter 14.
Introduction to Databases Transparencies
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
CSC 2720 Building Web Applications Database and SQL.
Chapter 3: SQL – Part I Yong Choi School of Business CSU, Bakersfield.
Chapter 1 Introduction to Databases
RIZWAN REHMAN, CCS, DU. Advantages of ORDBMSs  The main advantages of extending the relational data model come from reuse and sharing.  Reuse comes.
1 Chapter 2 Database Environment. 2 Chapter 2 - Objectives u Purpose of three-level database architecture. u Contents of external, conceptual, and internal.
Working with SQL and PL/SQL/ Session 1 / 1 of 27 SQL Server Architecture.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
Introduction To Databases IDIA 618 Fall 2014 Bridget M. Blodgett.
Dale Roberts 1 Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
Database Environment 1.  Purpose of three-level database architecture.  Contents of external, conceptual, and internal levels.  Purpose of external/conceptual.
Database Lecture # 1 By Ubaid Ullah.
Chapter 9 SQL and RDBMS Part C. SQL Copyright 2005 Radian Publishing Co.
CPS120: Introduction to Computer Science Information Systems: Database Management Nell Dale John Lewis.
CS370 Spring 2007 CS 370 Database Systems Lecture 2 Overview of Database Systems.
Chapter 2 CIS Sungchul Hong
Introduction to SQL Steve Perry
1 INTRODUCTION TO DATABASE MANAGEMENT SYSTEM L E C T U R E
Database System Concepts and Architecture
CODD’s 12 RULES OF RELATIONAL DATABASE
Module 3: The Relational Model.  Overview Terminology Relational Data Structure Mathematical Relations Database Relations Relational Keys Relational.
University of Sunderland COM 220Lecture Two Slide 1 Database Theory.
DAY 12: DATABASE CONCEPT Tazin Afrin September 26,
“INTRODUCTION TO DATABASE AND SQL”. Outlines 2  Introduction To Database  Database Concepts  Database Properties  What is Database Management System.
Component 4: Introduction to Information and Computer Science Unit 6: Databases and SQL Lecture 3 This material was developed by Oregon Health & Science.
Component 4/Unit 6c Topic III Structured Query Language Background information What can SQL do? How is SQL executed? SQL statement characteristics What.
Lecture # 3 & 4 Chapter # 2 Database System Concepts and Architecture Muhammad Emran Database Systems 1.
6.1 © 2010 by Prentice Hall 6 Chapter Foundations of Business Intelligence: Databases and Information Management.
Chapter 9 Database Systems Introduction to CS 1 st Semester, 2014 Sanghyun Park.
Chapter 2 THE DATABASE ENVIRONMENT Introduction to Databases: ANSI-SPARC Architecture Data independence Data models Relational database concepts Introduction.
The University of Akron Dept of Business Technology Computer Information Systems The Relational Model: Concepts 2440: 180 Database Concepts Instructor:
D R. E.F.C ODD ’ S R ULES FOR RDBMS Dr. E.F.Codd is an IBM researcher who first developed the relational data model in 1970.Dr. Codd published a list.
1 Chapter 1 Introduction to Databases Transparencies.
Database Fundamental & Design by A.Surasit Samaisut Copyrights : All Rights Reserved.
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,
The relational model A data model (in general) : Integrated collection of concepts for describing data (data requirements). Relational model was introduced.
CIT 613: Relational Database Development using SQL Introduction to SQL DeSiaMorePowered by DeSiaMore 1.
SQL.. AN OVERVIEW lecture3 1. Overview of SQL 2  Query: allow questions to be asked of the data and display only the information required. It can include.
Chapter 2 Database Environment.
1 Database Environment. 2 Objectives of Three-Level Architecture u All users should be able to access same data. u A user’s view is immune to changes.
1 Chapter 2 Database Environment Pearson Education © 2009.
SQL Introduction to database and SQL. Chapter 1: Databases and Database Users 6 Introduction to Databases Databases touch all aspects of our lives. Examples:
Introduction to Core Database Concepts Getting started with Databases and Structure Query Language (SQL)
uses of DB systems DB environment DB structure Codd’s rules current common RDBMs implementations.
LECTURE TWO Introduction to Databases: Data models Relational database concepts Introduction to DDL & DML.
SQL Basics Review Reviewing what we’ve learned so far…….
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.
Agenda for Today  DATABASE Definition What is DBMS? Types Of Database Most Popular Primary Database  SQL Definition What is SQL Server? Versions Of SQL.
Understanding Core Database Concepts Lesson 1. Objectives.
“Introduction To Database and SQL”
Chapter 2 Database Environment.
Relational Database Management System
RDBMS CHAPTER - 2.
Introduction to Databases
Chapter 2 Database Environment.
“Introduction To Database and SQL”
Chapter 2 Database Environment Pearson Education © 2009.
Chapter 2 Database Environment.
Data Base System Lecture 2: Introduction to Database
Database solutions Database environment Marzena Nowakowska Faculty of Management and Computer Modelling Kielce University of Technology rooms: 3.21 C,
Introduction to Databases
Chapter 2 Database Environment Pearson Education © 2009.
Database SQL.
Chapter 2 Database Environment Pearson Education © 2009.
Relational data model. Codd's Rule E.F Codd was a Computer Scientist who invented Relational model for Database management. Based on relational model,
Presentation transcript:

CIT 613: Relational Database Development using SQL Introduction to SQL

The history of SQL begins in an IBM laboratory in San Jose, California, where SQL was developed in the late 1970s. The initials stand for Structured Query Language, and the language itself is often referred to as "sequel."

Introduction to SQL It was originally developed for IBM's DB2 product which is a relational database management system, or RDBMS. SQL is a nonprocedural language, in contrast to the procedural or third- generation languages (3GLs) such as PASCAL, C and C++.

Introduction to SQL Nonprocedural means what rather than how. For example, SQL describes what data to retrieve, delete, or insert, rather than how to perform the operation. Two standards organizations, the American National Standards Institute (ANSI) and the International Standards Organization (ISO), currently promote SQL standards to industry. E.g. is ANSI 92 standard

A Brief History of Databases Database systems store information in every conceivable business environment. From large tracking databases such as airline reservation systems to ATM application, database systems store and distribute the data that we depend on.

A Brief History of Databases Until the last few years, large database systems could be run only on large mainframe computers. These machines have traditionally been expensive to design, purchase, and maintain.

A Brief History of Databases However, today's generation of powerful, inexpensive workstation computers enables programmers to design software that maintains and distributes data quickly and inexpensively.

Relational Database Model The most popular data storage model is the relational database. The relational database model was invented by Dr. Edward E. Codd in 1970 A relational database store data in the form of relations (or Tables) Tables are made up of rows (tuples) and columns (fields).

Relational Database Model It is important to understand the relational database model because SQL evolved to service its concepts. Dr. Codd defined 13 rules, oddly enough referred to as Codd’s 12 rules, that define the relational model:

Codd’s 12 rules 0. A relational DBMS must be able to manage databases entirely through its relational capabilities. 1. The Information Rule. All information in a relational database (including table and column names) is represented explicitly as values in tables. 2. Guaranteed Access. Every value in a relational database is guaranteed to be accessible by using a combination of the table name, primary key value, and column name.

Codd’s 12 rules Cont… 3. Systematic Null Value Support. The DBMS provides systematic support for the treatment of null values (unknown or inapplicable data), distinct from default values, and independent of any domain. 4. Active, On-Line Relational Catalog. The description of the database and its contents is represented at the logical level as tables, and can therefore be queried using the database language.

Codd’s 12 rules Cont… 5. Comprehensive Data Sublanguage. There must be at least one language supported that has a well-defined syntax and is comprehensive, in that it supports data definition, manipulation, integrity rules, authorization, and transactions. 6. View Updating Rule. All views that are theoretically updatable can be updated through the system. 7. Set-Level Insertion, Update, and Deletion. The DBMS supports not only set-level retrievals, but also set-level inserts, updates, and deletes.

Codd’s 12 rules Cont… 8. Physical Data Independence. Application programs and ad hoc programs are logically unaffected when physical access methods or storage structures are altered. 9. Logical Data Independence. Application programs and ad hoc programs are logically unaffected, to the extent possible, when changes are made to the table structures. 10. Integrity Independence. The database language must be capable of defining integrity rules. They must be stored in the on-line catalog, and they cannot be bypassed.

Codd’s 12 rules Cont… 11. Distribution Independence. Application programs and ad hoc requests are logically unaffected when data is first distributed, or when it is redistributed. 12. Nonsubversion. It must not be possible to bypass the integrity rules defined through the database language by using lower-level languages.

Relational DB Concept Codd’s idea for a Relational Database Management System (RDBMS) uses the concepts of relational algebra to break data down into sets and common subsets. Because information can naturally be grouped into distinct sets, Dr. Codd organized his database system around this concept.

Relational DB Concept Under the relational model, data is separated into sets that resemble a table structure. This table structure consists of individual data elements called columns or fields. A single set of a group of fields is known as a record or row.

Relational DB Concept For instance, to create a relational database consisting of employee data, one might start with a table called EMPLOYEE. In this EMPLOYEE table, you might start with the following pieces of information: name, age, and occupation. These three pieces of data make up the fields in the EMPLOYEE table

Relational DB Example: Employee Table

Employee Table The four rows comprise the records for the EMPLOYEE table. If a user wanted to retrieve a specific record from this table, he would instruct the database management system (DBMS) to retrieve the records where the NAME field equaled, for instance, Jan Janis.

Why SQL? If the DBMS had been instructed to retrieve all the fields, the employee’s name, age, and occupation would be returned to the user. SQL is the language used to instruct the database to retrieve this data. An example SQL statement that makes this query is: SELECT * FROM EMPLOYEE

Why SQL? One of SQL’s greatest benefits is that it is truly a cross-platform language. In addition, it is virtually a cross-platform, cross-product language. Because it is also what programmers refer to as a high-level or fourth-generation language (4GL), a large amount of work can be done in fewer lines of code.