SlideShare a Scribd company logo
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

More Related Content

What's hot

Sql Constraints
Sql ConstraintsSql Constraints
Sql Constraints
I L0V3 CODING DR
 
Excel presentation data validation
Excel presentation   data validationExcel presentation   data validation
Excel presentation data validation
Nagamani Y R
 
Access lesson 04 Creating and Modifying Forms
Access lesson 04 Creating and Modifying FormsAccess lesson 04 Creating and Modifying Forms
Access lesson 04 Creating and Modifying FormsAram SE
 
SQL - DML and DDL Commands
SQL - DML and DDL CommandsSQL - DML and DDL Commands
SQL - DML and DDL Commands
Shrija Madhu
 
MS Office Access Tutorial
MS Office Access TutorialMS Office Access Tutorial
MS Office Access TutorialvirtualMaryam
 
Charts in EXCEL
Charts in EXCELCharts in EXCEL
Charts in EXCEL
pkottke
 
Ms access 2007
Ms access 2007Ms access 2007
Ms access 2007
Ramesh Pant
 
Access 2010 Unit A PPT
Access 2010 Unit A PPTAccess 2010 Unit A PPT
Access 2010 Unit A PPTokmomwalking
 
System configuration
System configurationSystem configuration
System configuration
argusacademy
 
SQL Queries
SQL QueriesSQL Queries
SQL Queries
Nilt1234
 
Relational database
Relational database Relational database
Relational database
Megha Sharma
 
Relational model
Relational modelRelational model
Relational model
Dabbal Singh Mahara
 
Ms Excel Basic to Advance Tutorial
Ms Excel Basic to Advance TutorialMs Excel Basic to Advance Tutorial
Ms Excel Basic to Advance Tutorial
Bikal Shrestha
 
Basic Ms excel
Basic Ms excelBasic Ms excel
Basic Ms excel
maharzahid0
 
Ms word 2013
Ms word 2013Ms word 2013
Ms word 2013
mufassirin
 
Excel
ExcelExcel
MS ACCESS PPT.pptx
MS ACCESS PPT.pptxMS ACCESS PPT.pptx
MS ACCESS PPT.pptx
sourav mathur
 
Database Concepts and Terminologies
Database Concepts and TerminologiesDatabase Concepts and Terminologies
Database Concepts and Terminologies
Ousman Faal
 
Field properties
Field propertiesField properties
Field properties
Dastan Kamaran
 

What's hot (20)

Sql Constraints
Sql ConstraintsSql Constraints
Sql Constraints
 
Excel presentation data validation
Excel presentation   data validationExcel presentation   data validation
Excel presentation data validation
 
Access lesson 04 Creating and Modifying Forms
Access lesson 04 Creating and Modifying FormsAccess lesson 04 Creating and Modifying Forms
Access lesson 04 Creating and Modifying Forms
 
SQL - DML and DDL Commands
SQL - DML and DDL CommandsSQL - DML and DDL Commands
SQL - DML and DDL Commands
 
MS Office Access Tutorial
MS Office Access TutorialMS Office Access Tutorial
MS Office Access Tutorial
 
Charts in EXCEL
Charts in EXCELCharts in EXCEL
Charts in EXCEL
 
Ms access 2007
Ms access 2007Ms access 2007
Ms access 2007
 
Access 2010 Unit A PPT
Access 2010 Unit A PPTAccess 2010 Unit A PPT
Access 2010 Unit A PPT
 
System configuration
System configurationSystem configuration
System configuration
 
SQL Queries
SQL QueriesSQL Queries
SQL Queries
 
Relational database
Relational database Relational database
Relational database
 
Relational model
Relational modelRelational model
Relational model
 
Ms Excel Basic to Advance Tutorial
Ms Excel Basic to Advance TutorialMs Excel Basic to Advance Tutorial
Ms Excel Basic to Advance Tutorial
 
Basic Ms excel
Basic Ms excelBasic Ms excel
Basic Ms excel
 
Ms word 2013
Ms word 2013Ms word 2013
Ms word 2013
 
22 Excel Basics
22 Excel Basics22 Excel Basics
22 Excel Basics
 
Excel
ExcelExcel
Excel
 
MS ACCESS PPT.pptx
MS ACCESS PPT.pptxMS ACCESS PPT.pptx
MS ACCESS PPT.pptx
 
Database Concepts and Terminologies
Database Concepts and TerminologiesDatabase Concepts and Terminologies
Database Concepts and Terminologies
 
Field properties
Field propertiesField properties
Field properties
 

Viewers also liked

Agentes inteligentes
Agentes inteligentesAgentes inteligentes
Agentes inteligentes
menamigue
 
Lenguajes
LenguajesLenguajes
Lenguajes
TERE FERNÁNDEZ
 
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 abstractos
Luis 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 relacion
Brayan Vega Diaz
 
Redes De Fibra Optica
Redes De Fibra OpticaRedes De Fibra Optica
Redes De Fibra Optica
Inma Olías
 
Online real estate management system
Online real estate management systemOnline real estate management system
Online real estate management systemYasmeen Od
 

Viewers also liked (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
 

Similar to 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
 
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
VinaOconner450
 
Sql tutorial
Sql tutorialSql tutorial
Sql tutorial
Rumman Ansari
 
Sq lite manager
Sq lite managerSq lite manager
Sq lite manager
Aravindharamanan S
 
Managing SQLserver for the reluctant DBA
Managing SQLserver for the reluctant DBAManaging SQLserver for the reluctant DBA
Managing SQLserver for the reluctant DBAConcentrated Technology
 
Mule data bases
Mule data basesMule data bases
Mule data bases
Naresh Naidu
 
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
DIPESH30
 
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 Alerting
Sean 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 scene
quest2900
 
Using microsoftaccess1 gettingstarted
Using microsoftaccess1 gettingstartedUsing microsoftaccess1 gettingstarted
Using microsoftaccess1 gettingstarted
jcjo05
 
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.pptx
SiddhantBhardwaj26
 
SQL for interview
SQL for interviewSQL for interview
SQL for interview
Aditya Kumar Tripathy
 
Steps towards of sql server developer
Steps towards of sql server developerSteps towards of sql server developer
Steps towards of sql server developer
Ahsan Kabir
 
PATTERNS07 - Data Representation in C#
PATTERNS07 - Data Representation in C#PATTERNS07 - Data Representation in C#
PATTERNS07 - Data Representation in C#
Michael Heron
 

Similar to 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!
 
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
 
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#
 

Recently uploaded

How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
CatarinaPereira64715
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 

Recently uploaded (20)

How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 

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