SQL introduction. SWC - 2011 2 Getting data out of databases Databases are ”just” containers of data We could – in principle – just put data in a text.

Slides:



Advertisements
Similar presentations
Why is that LOV in the screen not returning me desired value?
Advertisements

Database Management Systems and Enterprise Software
Query Methods (SQL). What is SQL A programming language for databases. SQL (structured Query Language) It allows you add, edit, delete and run queries.
Basic SQL Introduction Presented by: Madhuri Bhogadi.
COMP 3715 Spring 05. Working with data in a DBMS Any database system must allow user to  Define data Relations Attributes Constraints  Manipulate data.
Relational Databases Chapter 4.
Some Introductory Programming 1. Structured Query Language (SQL) - used for queries. - a standard database product. 2. Visual Basic for Applications -
Chapter 14 Organizing and Manipulating the Data in Databases
Chapter 12 Information Systems. 2 Chapter Goals Define the role of general information systems Explain how spreadsheets are organized Create spreadsheets.
Other Features Index and table of contents Macros and VBA.
Relational Database Need to Knows. What is a database? Data - is just a pile of numbers or stats. A business "organises" the data to be meaningful and.
MY SQL Eng: SAHAR. Introduction to SQL What is SQL? When a user wants to get some information from a database file, he can issue a query A query is a.
CHAPTER 9 DATABASE MANAGEMENT © Prepared By: Razif Razali.
Introduction to SQL Yong Choi School of Business CSU, Bakersfield.
CPS120: Introduction to Computer Science Information Systems: Database Management Nell Dale John Lewis.
IE 423 – Design of Decision Support Systems Data modeling and database development.
SQL Server 2000 Acropolis Institute of Technology and Research Database fundamentals Prepared By: Rahul Patel.
Software. Records Fields Each record is made up of fields – categories of information. The fields here are Name, Surname, Address, Telephone and Date.
CPS120: Introduction to Computer Science Lecture 19 Introduction to SQL.
Introduction to Computers Lesson 10B. home Database A collection of related data or facts.
Introduction to Computers Lesson 10B. home Database A collection of related data or facts.
Database What is a database? A database is a collection of information that is typically organized so that it can easily be storing, managing and retrieving.
JDBC Java and Databases. RHS – SOC 2 JDBC JDBC – Java DataBase Connectivity An API (i.e. a set of classes and methods), for working with databases in.
ASP.NET The Clock Project. The ASP.NET Clock Project The ASP.NET Clock Project is the topic of Chapter 23. By completing the clock project, you will learn.
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.
Nic Shulver Chris Introduction to databases Introduction Storage Temporary and Permanent Unstructured.
Advanced Database CS-426 Week 1 - Introduction. Database Management System DBMS contains information about a particular enterprise Collection of interrelated.
CIS 375—Web App Dev II SQL. 2 Introduction SQL (Structured _______ Language) is an ANSI standard language for accessing databases.ANSI SQL can execute.
Computers in the Library A database application. Input and Output Devices Input Keyboard Mouse Scanner / light pen Output VDU / screen / monitor Printer.
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.
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 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,
Microsoft Access is a database program to manage sort retrieve group filter for certain records.
Databases Letts Chapter 11. A database program can be used to:  sort a file into a different order;  search through the records for a matching string.
Database Management System. DBMS A software package that allows users to create, retrieve and modify databases. A database is a collection of related.
Chapter 10 Database Management. Data and Information How are data and information related? p Fig Next processing data stored on disk Step.
A table is a set of data elements (values) that is organized using a model of vertical columns (which are identified by their name) and horizontal rows.
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.
Producing a Mail Merged Letter Step 1 Create an Access database for Names and Addresses you can use the ‘Customers’ template in Group Work. Enter the necessary.
Microsoft Access Introduction. What is a database? A DATABASE is a collection of related data.
WEEK# 12 Haifa Abulaiha November 02,
SQL Introduction to database and SQL. Chapter 1: Databases and Database Users 6 Introduction to Databases Databases touch all aspects of our lives. Examples:
JDBC Java and Databases. SWC – JDBC JDBC – Java DataBase Connectivity An API (i.e. a set of classes and methods), for working with databases in.
Introduction to File Processing with PHP. Review of Course Outcomes 1. Implement file reading and writing programs using PHP. 2. Identify file access.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 The SqlCommand Object ADO.NET - Lesson 03  Training time: 15 minutes  Author:
The Database Concept and the Database Management System (DBMS) Databases.
Introduction to Database Programming with Python Gary Stewart
DAY 20: ACCESS CHAPTERS 5, 6, 7 Larry Reaves October 28,
Query Methods Simple SQL Statements Start ….
Query Methods Where Clauses Start ….
Query Methods Where Clauses Start ….
Oracle & SQL Introduction
Understand Data Manipulation Language (DML)
Chapter 12 Information Systems.
Understand Data Manipulation Language (DML)
Databases and Information Management
PHP and MySQL.
Access Lesson 2 Creating a Database
مقدمة في قواعد البيانات
Developing a Model-View-Controller Component for Joomla Part 3
Database Design and Development
SQL .. An overview lecture3.
Chapter 9 Query-by-Example Pearson Education © 2009.
Required queries FdSc inICT Module 107.
Topic 12 Lesson 2 – Retrieving Data with Queries
Updating Databases With Open SQL
Query-by-Example Transparencies
Database Management Systems and Enterprise Software
Updating Databases With Open SQL
Presentation transcript:

SQL introduction

SWC Getting data out of databases Databases are ”just” containers of data We could – in principle – just put data in a text file instead The real strength of databases is the ability to efficiently retrieve a specified subset of data

SWC Getting data out of databases Suppose we have information about a set of persons: –Name –Address –Date of birth –Occupation –Income –… We wish to find all persons, who are older than 40 years, and have an income of more than $50,000 Is that an easy or hard task…?

SWC Getting data out of databases NameAddressDate of birthOccupationIncome John None$20,000 Mira Doctor$120,000 Alex Programmer$240,000 Steven Teacher$60,000 Joanne Doctor$90,000 Hannah Nurse$45,000 Susanne None$20,000

SWC Getting data out of databases NameAddressDate of birthOccupationIncome John None$20,000 Mira Doctor$120,000 Alex Programmer$240,000 Steven Teacher$60,000 Joanne Doctor$90,000 Hannah Nurse$45,000 Susanne None$20,000 ”Older than 40 years”

SWC Getting data out of databases NameAddressDate of birthOccupationIncome Mira Doctor$120,000 Steven Teacher$60,000 Joanne Doctor$90,000 Susanne None$20,000

SWC Getting data out of databases NameAddressDate of birthOccupationIncome Mira Doctor$120,000 Steven Teacher$60,000 Joanne Doctor$90,000 Susanne None$20,000 ”Income of more than $50,000”

SWC Getting data out of databases NameAddressDate of birthOccupationIncome Mira Doctor$120,000 Steven Teacher$60,000 Joanne Doctor$90,000

SWC Getting data out of databases Pretty easy; we could almost do it just by looking at the table What if we had 100,000 records…? Maybe I could write a small program to pick out the relevant records

SWC Getting data out of databases for (Records r : recordList) { if ((r.getAge() > 40) and (r.getIncome() > 50000)) { selectedRecords.add(); }

SWC Getting data out of databases Fine, but… The code is very task-specific; can only solve this specific problem The code might be inefficient; we examine all records to find the specified subset Enter SQL!

SWC SQL SQL – Structured Query Language A language which enables us to specify subsets of data in a database Subsets in terms of –Tables –Fields –Conditions on fields

SWC SQL SQL is the standard for database languages It is non-procedural; you specify what data to find, not how to find it Fairly easy to learn and understand

SWC SQL SQL enables us to –Create databases and tables –Perform ”data management” like inserting, updating and deleting records –Perform queries on data; i.e. retrieve specified subsets of data We concentrate on queries initially