SlideShare ist ein Scribd-Unternehmen logo
1 von 20
Downloaden Sie, um offline zu lesen
SQL and Access
A Guide to Understanding SQL and its application in
Microsoft Access by Maggie McClelland
Why should I learn SQL?
 SQL is a common programming language used
  in many relational databases to manage data
  and records by performing tasks that would be
  time consuming to do by searching the records
  individually.

 Such relational databases are commonly used in
  the field of library and information science, which
  means that in addition to being useful in
  managing data….

 Means employers may want you to know it!
What Is SQL?
 SQL (Structured Query Language) is a
  programming language used for manipulating
  and managing data in relational databases such
  as Microsoft Access, MySQL, or Oracle.

What does SQL do?
  SQL interacts with data in tables by:
      inserting data
      querying data
      updating data
      deleting data
      creating schemas
      controlling access
What do I need to learn it?
You:

 In using it, its helpful to understand how data may
  already interact within databases, but not
  necessary to learning the fundamentals.

Your Computer:

 Relational database software such as Microsoft
  Access, mySQL, or Oracle.
A breakdown of SQL(anguage)
  Two major features
   Statements: affects data and structure (what data is
    in)
   Queries: retrieve data based on programming

  Clauses are the parts of these
   Within clauses may be:
     Expressions: produce the fields of a table
     Predicates: specifies under what conditions action
      is to occur




                                        Image retrieved from Wikipedia.org
TWO TYPES OF
STATEMENTS

 Data Definition Language       Data Manipulation Language

   Manages structure of data      Manages the data in
    tables and indices (where       structures
    data goes)                      ………………………..

   Some Basic Elements:           Some Basic Elements:
    Drop/Create,                    Select, Select…Into, Update,
    Grant/Revoke, Add, and          Delete, Insert…Into
    Alter
TWO TYPES OF
STATEMENTS
Data Definition Language
 Syntax is similar to computer programming
 Basic Statements are Composed of a Element
  part, Object part, and Name part,
  Ex: To create a Table Named „tblBooks‟ it would look
   like this:
   CREATE TABLE Books

 To include an expression to the CREATE TABLE to
 add Book ID and Title fields, insert them in
 brackets and separate out by a comma, all
 within parentheses. This is a common syntax.
  Ex: To add the fields BookID and Title:
   CREATE TABLE tblBooks ([BookID], [Title])
TWO TYPES OF
STATEMENTS
Data Manipulation Language
 Composed of dependent clauses

 Common features of syntax:
  “ “ to contain the data specified
  = to define the data to field relationship
 It is defined by a change to the data, in the
  below case, deletion from tblBooks all records
  which have 1999 in their Year field
  ex. DELETE FROM tblBooks
       WHERE Year = “1999”
Queries
 Queries themselves do not make any changes to
  the data or to the structure.
 Allows user to retrieve data from one or many
 tables.
 Performed with SELECT statement. Returning to our
 example to display all books published in 1999:
  Ex: Select From tblBooks
       Where Year = “1999”
                                      Note: SELECT is nominally
   said to be a statement but it does not ‘affect data
   and/or structure’. It just retrieves.

HOWEVER Queries are what make statements
happen. When combined in access with statements,
they make the changes to data that we desire.
What about Microsoft
Access?
All of these SQL aspects manage and manipulate
your data in be performed in Microsoft Access.

Microsoft Access is usually available with your
basic Microsoft Office package, as such it is widely
used.

 It is mostly suitable for any database under 2 GB.



In the next half, I will show you how to execute in
Microsoft Access common SQL commands.
Proceeding…
 Here is an access database to download if you
 wish to follow along with the tutorial:
  Upon opening it up, look on the left side of your
   screen. Double click on the first table selected,
   Books. This is where we will start from.

 What follows will be a slide of explanations and
 then a video. You can pause or stop the videos
 at any time and may jump around using the
 progress bar at the bottom of the video.

 These videos have no sound.
                                    Continuing on…
Queries
Simple SELECT query, designed to
  What follows is a simple „select‟
   filter records from a table.
 From the menu, next to Home, select Create.
 Go to the last section of selections, marked other.
   Select Query Design.
 Once you reach the Query Design screen you will be
   prompted by a window. Cancel this out. In the
   upper left corner under the round Windows
   Button, is a button that says SQL view. Select this.
 For a simple search calling all records from the Books
   table, enter:
           Select *
           FROM Books
 Going back to the upper left corner next to SQL view
   is another button that is an exclamation mark and
   says Run. Select this.         Play video here.
Queries
More complex SELECT
  To execute a query that pulls out specific
   information, we‟ll have to add a WHERE clause.

  Lets look for all books published in the year 1982.
   To do this we will be looking at all records in the
   Books table that have 1982 in the Year field.
  To go back to the screen where you can edit your SQL query, simply
     go to the button under your round windows button. There should be
     a down arrow to select other options.
  Click this and select your SQL view.
  Now that you are in SQL view, add to what you have so it reads:
                              Select *
                              FROM Books
                              Where Year = 1982
  Again, select Run when done.
                                                  Play video here.
Queries
Even More complex
SELECT
  Lets say that we want to combine two tables.
   Maybe we want to find all books published in
   1982 that were sent away for rebinding.

  Table named Actions this. In this table, Object
   specified in each record is linked to the BookID in
   the Books table. To draw these two together in
   our search we will use an INNER JOIN, specifying
   with ON which two of those records are linked.

  Because we have two tables now, we have to
   refer to the fields we are interested in as
   table.field
Queries
Even More complex
SELECT cont…
  To do this, return to your SQL query edit screen
   and enter:
    SELECT *
    FROM Books INNER JOIN Actions
    ON Actions.Object=Books.BookID
    WHERE Year = 1982


  Run this.


                               Play video here.
Changing Data
 Now we may want to change the data. In
  Microsoft Access, this is still done through the
  same Screen where we were entering SQL
  before.

 The most useful may be the UPDATE and the
  DELETE statements, which do exactly what they
  say. These are what we will execute.
Update Statements
 Say that you want to update the Authors field in the Books
  table with (LOC) following the names to show that they
  follow LOC name authority.

 We will use the UPDATE statement and following SET
  establish an expression to update the field.

 To do this return to your SQL query edit screen and enter:
    UPDATE Books
    SET Author=Author + " (LOC)“

                                                     Note: the + , this
      means add the following onto what is existing; we use “ “
      because what is inside these is text entered into the table‟s field.
                                          Play video here.
Delete Statements
 Lets say that our collection deacessioned all
  books made before 1970 and we want to delete
  these from our files.
 To do this return to your SQL query edit screen
  and enter:
       DELETE *
       FROM Books
       WHERE Year <1970

 Notice how we used < instead of = to find entries
  with values smaller than the number 1970.
                              Play video here.
Congratulations!
By now, you should have an understanding of SQL
  and a basic knowledge of how to use SQL in
  Microsoft Access

The best way to learn a new technology is to play
  with it, I encourage you to do so. Before you
  know it, you will be a pro!
Helpful Sites
 http://msdn.microsoft.com/en-
  us/library/bb177893%28v=office.12%29.aspx

 http://download.oracle.com/docs/cd/B28359_0
  1/appdev.111/b28370/static.htm

 http://w3schools.com/sql/sql_syntax.asp

Weitere ähnliche Inhalte

Was ist angesagt?

Skillshare - Creating Excel Dashboards
Skillshare - Creating Excel DashboardsSkillshare - Creating Excel Dashboards
Skillshare - Creating Excel DashboardsSchool of Data
 
Access 2010 Unit A PPT
Access 2010 Unit A PPTAccess 2010 Unit A PPT
Access 2010 Unit A PPTokmomwalking
 
data modeling and models
data modeling and modelsdata modeling and models
data modeling and modelssabah N
 
Intro to SQL for Beginners
Intro to SQL for BeginnersIntro to SQL for Beginners
Intro to SQL for BeginnersProduct School
 
Introduction to Database Management System
Introduction to Database Management SystemIntroduction to Database Management System
Introduction to Database Management SystemAmiya9439793168
 
Ms access ppt 2017 by Gopal saha
Ms access ppt 2017 by Gopal sahaMs access ppt 2017 by Gopal saha
Ms access ppt 2017 by Gopal saha253253
 
Chapter10 conceptual data modeling
Chapter10 conceptual data modelingChapter10 conceptual data modeling
Chapter10 conceptual data modelingDhani Ahmad
 
Introduction to ADO.NET
Introduction to ADO.NETIntroduction to ADO.NET
Introduction to ADO.NETrchakra
 
Introduction to Database
Introduction to DatabaseIntroduction to Database
Introduction to DatabaseSiti Ismail
 
Basic introduction to ms access
Basic introduction to ms accessBasic introduction to ms access
Basic introduction to ms accessjigeno
 
Advanced Sql Training
Advanced Sql TrainingAdvanced Sql Training
Advanced Sql Trainingbixxman
 
Types of charts in Excel and How to use them
Types of charts in Excel and How to use themTypes of charts in Excel and How to use them
Types of charts in Excel and How to use themVijay Perepa
 
Lecture 01 introduction to database
Lecture 01 introduction to databaseLecture 01 introduction to database
Lecture 01 introduction to databaseemailharmeet
 

Was ist angesagt? (20)

database
databasedatabase
database
 
Skillshare - Creating Excel Dashboards
Skillshare - Creating Excel DashboardsSkillshare - Creating Excel Dashboards
Skillshare - Creating Excel Dashboards
 
Access 2010 Unit A PPT
Access 2010 Unit A PPTAccess 2010 Unit A PPT
Access 2010 Unit A PPT
 
data modeling and models
data modeling and modelsdata modeling and models
data modeling and models
 
Intro to SQL for Beginners
Intro to SQL for BeginnersIntro to SQL for Beginners
Intro to SQL for Beginners
 
Introduction to Database Management System
Introduction to Database Management SystemIntroduction to Database Management System
Introduction to Database Management System
 
Ms access ppt 2017 by Gopal saha
Ms access ppt 2017 by Gopal sahaMs access ppt 2017 by Gopal saha
Ms access ppt 2017 by Gopal saha
 
Ms access
Ms accessMs access
Ms access
 
Sql commands
Sql commandsSql commands
Sql commands
 
Ms access
Ms accessMs access
Ms access
 
Chapter10 conceptual data modeling
Chapter10 conceptual data modelingChapter10 conceptual data modeling
Chapter10 conceptual data modeling
 
Introduction to ADO.NET
Introduction to ADO.NETIntroduction to ADO.NET
Introduction to ADO.NET
 
Introduction to Database
Introduction to DatabaseIntroduction to Database
Introduction to Database
 
Basic introduction to ms access
Basic introduction to ms accessBasic introduction to ms access
Basic introduction to ms access
 
Advanced Sql Training
Advanced Sql TrainingAdvanced Sql Training
Advanced Sql Training
 
Access ppt
Access ppt Access ppt
Access ppt
 
Types of charts in Excel and How to use them
Types of charts in Excel and How to use themTypes of charts in Excel and How to use them
Types of charts in Excel and How to use them
 
SQL(DDL & DML)
SQL(DDL & DML)SQL(DDL & DML)
SQL(DDL & DML)
 
MS Excel 2nd
MS Excel 2ndMS Excel 2nd
MS Excel 2nd
 
Lecture 01 introduction to database
Lecture 01 introduction to databaseLecture 01 introduction to database
Lecture 01 introduction to database
 

Andere mochten auch

Agentes inteligentes
Agentes inteligentesAgentes inteligentes
Agentes inteligentesmenamigue
 
Hacer un programa que calcule la suma de dos números y su producto
Hacer un programa que calcule la suma de dos números y su productoHacer un programa que calcule la suma de dos números y su producto
Hacer un programa que calcule la suma de dos números y su productoLeobardo Montalvo
 
Planificacion De Procesos y Procesadores
Planificacion De Procesos y ProcesadoresPlanificacion De Procesos y Procesadores
Planificacion De Procesos y ProcesadoresPkacho
 
Unidad No. 5 - Agentes Inteligentes
Unidad No. 5 - Agentes InteligentesUnidad No. 5 - Agentes Inteligentes
Unidad No. 5 - Agentes InteligentesMilton Klapp
 
La interfaz del servidor de directorios
La interfaz del servidor de directoriosLa interfaz del servidor de directorios
La interfaz del servidor de directoriospaola2545
 
Interfaz del Sistema de Archivos
Interfaz del Sistema de ArchivosInterfaz del Sistema de Archivos
Interfaz del Sistema de ArchivosAcristyM
 
Apuntes 1 parcial
Apuntes 1 parcialApuntes 1 parcial
Apuntes 1 parcialeleazar dj
 
Maquinas de turing
Maquinas de turingMaquinas de turing
Maquinas de turingJesus David
 
Sequencing, Alignment and Assembly
Sequencing, Alignment and AssemblySequencing, Alignment and Assembly
Sequencing, Alignment and AssemblyShaun Jackman
 
Planificacion del procesador
Planificacion del procesadorPlanificacion del procesador
Planificacion del procesadorManuel Ceron
 
Preguntas seguridad informática
Preguntas seguridad informáticaPreguntas seguridad informática
Preguntas seguridad informáticamorfouz
 
Estructuras de datos y tipos de datos abstractos
Estructuras de datos y tipos de datos abstractosEstructuras de datos y tipos de datos abstractos
Estructuras de datos y tipos de datos abstractosLuis Lastra Cid
 
Tipos abstractos de datos
Tipos abstractos de datosTipos abstractos de datos
Tipos abstractos de datosJose Armando
 
Entorno de desarrollo integrado de Visual Basic .NET
Entorno de desarrollo integrado de Visual Basic .NETEntorno de desarrollo integrado de Visual Basic .NET
Entorno de desarrollo integrado de Visual Basic .NETNilian Cabral
 
Taller modelo entidad relacion
Taller modelo entidad relacionTaller modelo entidad relacion
Taller modelo entidad relacionBrayan Vega Diaz
 
Redes De Fibra Optica
Redes De Fibra OpticaRedes De Fibra Optica
Redes De Fibra OpticaInma Olías
 
Online real estate management system
Online real estate management systemOnline real estate management system
Online real estate management systemYasmeen Od
 

Andere mochten auch (20)

Agentes inteligentes
Agentes inteligentesAgentes inteligentes
Agentes inteligentes
 
Lenguajes
LenguajesLenguajes
Lenguajes
 
Hacer un programa que calcule la suma de dos números y su producto
Hacer un programa que calcule la suma de dos números y su productoHacer un programa que calcule la suma de dos números y su producto
Hacer un programa que calcule la suma de dos números y su producto
 
Planificacion De Procesos y Procesadores
Planificacion De Procesos y ProcesadoresPlanificacion De Procesos y Procesadores
Planificacion De Procesos y Procesadores
 
Unidad No. 5 - Agentes Inteligentes
Unidad No. 5 - Agentes InteligentesUnidad No. 5 - Agentes Inteligentes
Unidad No. 5 - Agentes Inteligentes
 
La interfaz del servidor de directorios
La interfaz del servidor de directoriosLa interfaz del servidor de directorios
La interfaz del servidor de directorios
 
Interfaz del Sistema de Archivos
Interfaz del Sistema de ArchivosInterfaz del Sistema de Archivos
Interfaz del Sistema de Archivos
 
Apuntes 1 parcial
Apuntes 1 parcialApuntes 1 parcial
Apuntes 1 parcial
 
Maquinas de turing
Maquinas de turingMaquinas de turing
Maquinas de turing
 
Sequencing, Alignment and Assembly
Sequencing, Alignment and AssemblySequencing, Alignment and Assembly
Sequencing, Alignment and Assembly
 
Planificacion del procesador
Planificacion del procesadorPlanificacion del procesador
Planificacion del procesador
 
Archivos Distribuidos
Archivos DistribuidosArchivos Distribuidos
Archivos Distribuidos
 
Preguntas seguridad informática
Preguntas seguridad informáticaPreguntas seguridad informática
Preguntas seguridad informática
 
Tipos de Datos Abstractos.
Tipos de Datos Abstractos.Tipos de Datos Abstractos.
Tipos de Datos Abstractos.
 
Estructuras de datos y tipos de datos abstractos
Estructuras de datos y tipos de datos abstractosEstructuras de datos y tipos de datos abstractos
Estructuras de datos y tipos de datos abstractos
 
Tipos abstractos de datos
Tipos abstractos de datosTipos abstractos de datos
Tipos abstractos de datos
 
Entorno de desarrollo integrado de Visual Basic .NET
Entorno de desarrollo integrado de Visual Basic .NETEntorno de desarrollo integrado de Visual Basic .NET
Entorno de desarrollo integrado de Visual Basic .NET
 
Taller modelo entidad relacion
Taller modelo entidad relacionTaller modelo entidad relacion
Taller modelo entidad relacion
 
Redes De Fibra Optica
Redes De Fibra OpticaRedes De Fibra Optica
Redes De Fibra Optica
 
Online real estate management system
Online real estate management systemOnline real estate management system
Online real estate management system
 

Ähnlich wie Tutorial for using SQL in Microsoft Access

Sql server 2012 tutorials writing transact-sql statements
Sql server 2012 tutorials   writing transact-sql statementsSql server 2012 tutorials   writing transact-sql statements
Sql server 2012 tutorials writing transact-sql statementsSteve Xu
 
Waiting too long for Excel's VLOOKUP? Use SQLite for simple data analysis!
Waiting too long for Excel's VLOOKUP? Use SQLite for simple data analysis!Waiting too long for Excel's VLOOKUP? Use SQLite for simple data analysis!
Waiting too long for Excel's VLOOKUP? Use SQLite for simple data analysis!Amanda Lam
 
Managing SQLserver for the reluctant DBA
Managing SQLserver for the reluctant DBAManaging SQLserver for the reluctant DBA
Managing SQLserver for the reluctant DBAConcentrated Technology
 
Lab 2 Work with Dictionary and Create Relational Database (60 pts.docx
Lab 2 Work with Dictionary and Create Relational Database (60 pts.docxLab 2 Work with Dictionary and Create Relational Database (60 pts.docx
Lab 2 Work with Dictionary and Create Relational Database (60 pts.docxDIPESH30
 
It203 class slides-unit5
It203 class slides-unit5It203 class slides-unit5
It203 class slides-unit5Matthew Moldvan
 
Automation Of Reporting And Alerting
Automation Of Reporting And AlertingAutomation Of Reporting And Alerting
Automation Of Reporting And AlertingSean Durocher
 
Access tips access and sql part 1 setting the sql scene
Access tips  access and sql part 1  setting the sql sceneAccess tips  access and sql part 1  setting the sql scene
Access tips access and sql part 1 setting the sql scenequest2900
 
Using microsoftaccess1 gettingstarted
Using microsoftaccess1 gettingstartedUsing microsoftaccess1 gettingstarted
Using microsoftaccess1 gettingstartedjcjo05
 
4) databases
4) databases4) databases
4) databasestechbed
 
Introduction4 SQLite
Introduction4 SQLiteIntroduction4 SQLite
Introduction4 SQLiteStanley Huang
 
Introduction to Oracle Database.pptx
Introduction to Oracle Database.pptxIntroduction to Oracle Database.pptx
Introduction to Oracle Database.pptxSiddhantBhardwaj26
 
Steps towards of sql server developer
Steps towards of sql server developerSteps towards of sql server developer
Steps towards of sql server developerAhsan Kabir
 
PATTERNS07 - Data Representation in C#
PATTERNS07 - Data Representation in C#PATTERNS07 - Data Representation in C#
PATTERNS07 - Data Representation in C#Michael Heron
 

Ähnlich wie Tutorial for using SQL in Microsoft Access (20)

Sql server 2012 tutorials writing transact-sql statements
Sql server 2012 tutorials   writing transact-sql statementsSql server 2012 tutorials   writing transact-sql statements
Sql server 2012 tutorials writing transact-sql statements
 
Waiting too long for Excel's VLOOKUP? Use SQLite for simple data analysis!
Waiting too long for Excel's VLOOKUP? Use SQLite for simple data analysis!Waiting too long for Excel's VLOOKUP? Use SQLite for simple data analysis!
Waiting too long for Excel's VLOOKUP? Use SQLite for simple data analysis!
 
Sql tutorial
Sql tutorialSql tutorial
Sql tutorial
 
Sq lite manager
Sq lite managerSq lite manager
Sq lite manager
 
Managing SQLserver for the reluctant DBA
Managing SQLserver for the reluctant DBAManaging SQLserver for the reluctant DBA
Managing SQLserver for the reluctant DBA
 
Mule data bases
Mule data basesMule data bases
Mule data bases
 
Lab 2 Work with Dictionary and Create Relational Database (60 pts.docx
Lab 2 Work with Dictionary and Create Relational Database (60 pts.docxLab 2 Work with Dictionary and Create Relational Database (60 pts.docx
Lab 2 Work with Dictionary and Create Relational Database (60 pts.docx
 
It203 class slides-unit5
It203 class slides-unit5It203 class slides-unit5
It203 class slides-unit5
 
Sqlite
SqliteSqlite
Sqlite
 
Automation Of Reporting And Alerting
Automation Of Reporting And AlertingAutomation Of Reporting And Alerting
Automation Of Reporting And Alerting
 
Access tips access and sql part 1 setting the sql scene
Access tips  access and sql part 1  setting the sql sceneAccess tips  access and sql part 1  setting the sql scene
Access tips access and sql part 1 setting the sql scene
 
Using microsoftaccess1 gettingstarted
Using microsoftaccess1 gettingstartedUsing microsoftaccess1 gettingstarted
Using microsoftaccess1 gettingstarted
 
4) databases
4) databases4) databases
4) databases
 
Sql2008 (1)
Sql2008 (1)Sql2008 (1)
Sql2008 (1)
 
Introduction4 SQLite
Introduction4 SQLiteIntroduction4 SQLite
Introduction4 SQLite
 
Introduction to Oracle Database.pptx
Introduction to Oracle Database.pptxIntroduction to Oracle Database.pptx
Introduction to Oracle Database.pptx
 
SQL for interview
SQL for interviewSQL for interview
SQL for interview
 
Steps towards of sql server developer
Steps towards of sql server developerSteps towards of sql server developer
Steps towards of sql server developer
 
PATTERNS07 - Data Representation in C#
PATTERNS07 - Data Representation in C#PATTERNS07 - Data Representation in C#
PATTERNS07 - Data Representation in C#
 
Sq lite
Sq liteSq lite
Sq lite
 

Kürzlich hochgeladen

Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemAsko Soukka
 
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UbiTrack UK
 
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfIaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfDaniel Santiago Silva Capera
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1DianaGray10
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Commit University
 
Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsSeth Reyes
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationIES VE
 
AI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarAI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarPrecisely
 
Building AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxBuilding AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxUdaiappa Ramachandran
 
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...DianaGray10
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IES VE
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8DianaGray10
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPathCommunity
 
Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.YounusS2
 
Videogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdfVideogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdfinfogdgmi
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxMatsuo Lab
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Adtran
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesMd Hossain Ali
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1DianaGray10
 

Kürzlich hochgeladen (20)

Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystem
 
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
 
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfIaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)
 
Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and Hazards
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
 
AI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarAI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity Webinar
 
Building AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxBuilding AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptx
 
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
 
20230104 - machine vision
20230104 - machine vision20230104 - machine vision
20230104 - machine vision
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
 
Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.
 
Videogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdfVideogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdf
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptx
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
 

Tutorial for using SQL in Microsoft Access

  • 1. SQL and Access A Guide to Understanding SQL and its application in Microsoft Access by Maggie McClelland
  • 2. Why should I learn SQL?  SQL is a common programming language used in many relational databases to manage data and records by performing tasks that would be time consuming to do by searching the records individually.  Such relational databases are commonly used in the field of library and information science, which means that in addition to being useful in managing data….  Means employers may want you to know it!
  • 3. What Is SQL?  SQL (Structured Query Language) is a programming language used for manipulating and managing data in relational databases such as Microsoft Access, MySQL, or Oracle. What does SQL do?  SQL interacts with data in tables by:  inserting data  querying data  updating data  deleting data  creating schemas  controlling access
  • 4. What do I need to learn it? You:  In using it, its helpful to understand how data may already interact within databases, but not necessary to learning the fundamentals. Your Computer:  Relational database software such as Microsoft Access, mySQL, or Oracle.
  • 5. A breakdown of SQL(anguage)  Two major features  Statements: affects data and structure (what data is in)  Queries: retrieve data based on programming  Clauses are the parts of these  Within clauses may be:  Expressions: produce the fields of a table  Predicates: specifies under what conditions action is to occur Image retrieved from Wikipedia.org
  • 6. TWO TYPES OF STATEMENTS  Data Definition Language  Data Manipulation Language  Manages structure of data  Manages the data in tables and indices (where structures data goes) ………………………..  Some Basic Elements:  Some Basic Elements: Drop/Create, Select, Select…Into, Update, Grant/Revoke, Add, and Delete, Insert…Into Alter
  • 7. TWO TYPES OF STATEMENTS Data Definition Language  Syntax is similar to computer programming  Basic Statements are Composed of a Element part, Object part, and Name part,  Ex: To create a Table Named „tblBooks‟ it would look like this: CREATE TABLE Books  To include an expression to the CREATE TABLE to add Book ID and Title fields, insert them in brackets and separate out by a comma, all within parentheses. This is a common syntax.  Ex: To add the fields BookID and Title: CREATE TABLE tblBooks ([BookID], [Title])
  • 8. TWO TYPES OF STATEMENTS Data Manipulation Language  Composed of dependent clauses  Common features of syntax:  “ “ to contain the data specified  = to define the data to field relationship  It is defined by a change to the data, in the below case, deletion from tblBooks all records which have 1999 in their Year field  ex. DELETE FROM tblBooks WHERE Year = “1999”
  • 9. Queries  Queries themselves do not make any changes to the data or to the structure.  Allows user to retrieve data from one or many tables.  Performed with SELECT statement. Returning to our example to display all books published in 1999:  Ex: Select From tblBooks Where Year = “1999” Note: SELECT is nominally said to be a statement but it does not ‘affect data and/or structure’. It just retrieves. HOWEVER Queries are what make statements happen. When combined in access with statements, they make the changes to data that we desire.
  • 10. What about Microsoft Access? All of these SQL aspects manage and manipulate your data in be performed in Microsoft Access. Microsoft Access is usually available with your basic Microsoft Office package, as such it is widely used.  It is mostly suitable for any database under 2 GB. In the next half, I will show you how to execute in Microsoft Access common SQL commands.
  • 11. Proceeding…  Here is an access database to download if you wish to follow along with the tutorial:  Upon opening it up, look on the left side of your screen. Double click on the first table selected, Books. This is where we will start from.  What follows will be a slide of explanations and then a video. You can pause or stop the videos at any time and may jump around using the progress bar at the bottom of the video.  These videos have no sound. Continuing on…
  • 12. Queries Simple SELECT query, designed to  What follows is a simple „select‟ filter records from a table. From the menu, next to Home, select Create. Go to the last section of selections, marked other. Select Query Design. Once you reach the Query Design screen you will be prompted by a window. Cancel this out. In the upper left corner under the round Windows Button, is a button that says SQL view. Select this. For a simple search calling all records from the Books table, enter: Select * FROM Books Going back to the upper left corner next to SQL view is another button that is an exclamation mark and says Run. Select this. Play video here.
  • 13. Queries More complex SELECT  To execute a query that pulls out specific information, we‟ll have to add a WHERE clause.  Lets look for all books published in the year 1982. To do this we will be looking at all records in the Books table that have 1982 in the Year field. To go back to the screen where you can edit your SQL query, simply go to the button under your round windows button. There should be a down arrow to select other options. Click this and select your SQL view. Now that you are in SQL view, add to what you have so it reads: Select * FROM Books Where Year = 1982 Again, select Run when done. Play video here.
  • 14. Queries Even More complex SELECT  Lets say that we want to combine two tables. Maybe we want to find all books published in 1982 that were sent away for rebinding.  Table named Actions this. In this table, Object specified in each record is linked to the BookID in the Books table. To draw these two together in our search we will use an INNER JOIN, specifying with ON which two of those records are linked.  Because we have two tables now, we have to refer to the fields we are interested in as table.field
  • 15. Queries Even More complex SELECT cont…  To do this, return to your SQL query edit screen and enter: SELECT * FROM Books INNER JOIN Actions ON Actions.Object=Books.BookID WHERE Year = 1982 Run this. Play video here.
  • 16. Changing Data  Now we may want to change the data. In Microsoft Access, this is still done through the same Screen where we were entering SQL before.  The most useful may be the UPDATE and the DELETE statements, which do exactly what they say. These are what we will execute.
  • 17. Update Statements  Say that you want to update the Authors field in the Books table with (LOC) following the names to show that they follow LOC name authority.  We will use the UPDATE statement and following SET establish an expression to update the field.  To do this return to your SQL query edit screen and enter: UPDATE Books SET Author=Author + " (LOC)“ Note: the + , this means add the following onto what is existing; we use “ “ because what is inside these is text entered into the table‟s field. Play video here.
  • 18. Delete Statements  Lets say that our collection deacessioned all books made before 1970 and we want to delete these from our files.  To do this return to your SQL query edit screen and enter: DELETE * FROM Books WHERE Year <1970  Notice how we used < instead of = to find entries with values smaller than the number 1970. Play video here.
  • 19. Congratulations! By now, you should have an understanding of SQL and a basic knowledge of how to use SQL in Microsoft Access The best way to learn a new technology is to play with it, I encourage you to do so. Before you know it, you will be a pro!
  • 20. Helpful Sites  http://msdn.microsoft.com/en- us/library/bb177893%28v=office.12%29.aspx  http://download.oracle.com/docs/cd/B28359_0 1/appdev.111/b28370/static.htm  http://w3schools.com/sql/sql_syntax.asp