SlideShare uma empresa Scribd logo
1 de 19
UsingphyMyAdmintocreate SQL querieswithArchivistToolkit
1
Contents
Loggingin through the web interface...................................................................................................2
Search................................................................................................................................................4
Structure............................................................................................................................................5
Browse...............................................................................................................................................6
SQL – one table selected.....................................................................................................................7
SQL multiple table query.....................................................................................................................8
Printing or Exporting results..............................................................................................................12
Appendix..........................................................................................................................................17
UsingphyMyAdmintocreate SQL querieswithArchivistToolkit
2
Logging in throughthe web interface
1. Login at
http://the serveraddress/phpmyadmin
User: atdbread
Password: [see C.Peterson]
2. Select‘toolkit’
UsingphyMyAdmintocreate SQL querieswithArchivistToolkit
3
Thisdocumentcoverssome basicsof usingSQL queries.
We won’tuse these features:
 Query
 Operations
 Privileges
 Tracking
 Designer
We shouldbe usinguseraccount ‘atdbread’ that hasread-only rights.
This documentwill showscreensfromMike’sadmin accountincluding optionsto delete records,and
otheractionsthat are notavailableto the useratdbread.
Featurescoveredin this documentinclude:
 Search
 Structure
 Browse
 SQL
o Print
o Export
The directionsprovide examples.The readermayenterthe textshownin redfont.
UsingphyMyAdmintocreate SQL querieswithArchivistToolkit
4
Search
Example:Goto the Search tab; entersearchforSnyder,Mitch clickGo
Returnsresults:
UsingphyMyAdmintocreate SQL querieswithArchivistToolkit
5
Structure
Selectthe Structure tab
Showsnumberof rows in eachtable,there are 1,016 Accessionsrecords.
Example: Selectthe Accessions table toview the structure of aspecifictable.
Returnsfieldlist,propertiesof fields.
UsingphyMyAdmintocreate SQL querieswithArchivistToolkit
6
Browse
Selectthe Browse tab.Clicka table name onthe listof tables,e.g.,Accessions.
Letsyou browse recordsina table.
The Appendix of thisdocumentlistssome same datafromimportanttablesinthe system.The sample
data showsthe “id” fieldsthatyouneedtoknow inorderto create SQL statementsthatgetfieldsfrom
more than one table.
UsingphyMyAdmintocreate SQL querieswithArchivistToolkit
7
SQL – one table selected
Selectthe SQLtab
A defaultquerywilldisplayforthe chosentable.Select*meansselectall fieldsinthe table.
We will onlybe usingthe SELECTcommand. Notice a listof fieldsor‘columns’forthe chosentable is
shownonthe right-handside of the screen.
UsingphyMyAdmintocreate SQL querieswithArchivistToolkit
8
SQL multiple table query
The general syntax of an SQL query isto identifythe fieldsyouwantinthe “select” clause,thenlistthe
tablesinthe “from” clause. Inthe “where” clause youidentifywhichidfieldsare commonbetweenthe
tables,andoptionallyanyconditions.The optional “orderby” clause may be usedtospecifysorting
preference.
Example:Copyandpaste thissample queryintothe querybox:
SELECT
Resources.resourceId,
Resources.resourceIdentifier1,
Resources.title asResourceTitle,
ResourcesComponents.title asComponentTitle,
ResourcesComponents.resourceLevel,
ResourcesComponents.resourceComponentIdasComponentIdentifier,
ResourcesComponents.restrictionsApply,
ArchDescriptionRepeatingData.title asNoteType,
ArchDescriptionRepeatingData.notesEtcTypeId,
ArchDescriptionRepeatingData.noteContent
FROM
`Resources`,`ResourcesComponents`,`ArchDescriptionRepeatingData`
WHERE
Resources.resourceId=ResourcesComponents.resourceIdAND
ResourcesComponents.resourceId=ArchDescriptionRepeatingData.resourceIdAND
ArchDescriptionRepeatingData.notesEtcTypeIdIN ('8','9','31')
ORDER BY
Resources.resourceId,ComponentTitle;
Thenclickthe GO button
UsingphyMyAdmintocreate SQL querieswithArchivistToolkit
9
Resultsof query.Thisqueryreturnedover72 thousandrows!Itshows30 rows at a time,andyou can
scroll horizontallytosee the contentsof the fields.
Click‘Showquery box’to editthe query
Try this: Editthe WHERE clause,adding aconditiontolistonlyMS0253:
WHERE
Resources.resourceId=ResourcesComponents.resourceIdAND
ResourcesComponents.resourceId=ArchDescriptionRepeatingData.resourceIdAND
ArchDescriptionRepeatingData.notesEtcTypeIdIN ('8','9','31') AND
Resources.resourceidentifier1='MS0253'
ThenclickGO button
UsingphyMyAdmintocreate SQL querieswithArchivistToolkit
10
Resultsof revisedquery,42rowsselected.
Exercise toretrieve extentsinDCAAP
1. Findinformationabout repositories,includingthe importantrepositoryId
a. Selectthe SQLtab
i. Enter thisqueryandclickGo
select* from`Repositories`;
ii. Note the DCAAPrepositoryidis5. Let’sfindthe extentsof Resourcesassociated
withDCAAP:
b. Selectthe SQLtab
i. Enter thisqueryandclickGo
(note the fieldnamesare enclosedinbackticksinthe selectclause,but
the fieldname inthe where clause isnot.The value inthe where clause
isenclosedinsingle quotes;the statementendsinasemicolon.)
select`title`,`extentNumber`,`extentType`
from`Resources`
where
Resources.repositoryId='5';
UsingphyMyAdmintocreate SQL querieswithArchivistToolkit
11
Resultof the query
Thismightmake a goodreport.
UsingphyMyAdmintocreate SQL querieswithArchivistToolkit
12
Printing or Exporting results
Scroll to the endof the queryoutput.
Selectthe Printview(with full texts) to geta printoutthatlookslike the example below.
UsingphyMyAdmintocreate SQL querieswithArchivistToolkit
13
Selectthe Export option.
The followingoptionselector displays(the defaultFormatmaysay SQL):
Choose Quickor Customdisplayoptions.
Choose a Format,e.g.,CSV forExcel
Clickthe Go button
The file will be downloadedtoyourworkstation,asinthisexample,Resources.csv
UsingphyMyAdmintocreate SQL querieswithArchivistToolkit
14
Start a new spreadsheetinExcel
Go to the Data tab, clickthe “From Text”option
Selectthe file toimport
Clickthe Importbutton
UsingphyMyAdmintocreate SQL querieswithArchivistToolkit
15
Complete the stepsinTextImportWizard
Note:
SelectOtherfromthe Delimiterssection,andenterasemicoloncharacterinthe box.
The fieldsshouldlooklike thisscreenshot:
UsingphyMyAdmintocreate SQL querieswithArchivistToolkit
16
Here is ourreport as a spreadsheet:
UsingphyMyAdmintocreate SQL querieswithArchivistToolkit
17
Appendix
Sample data
Table: Repositories
repositoryId: 1
repositoryName: Special CollectionsResearchCenter,The George WashingtonUniversity
shortName: Spec
repositoryId: 2
repositoryName: Global ResourcesCenter
shortName: GRC
repositoryId: 3
repositoryName: Giftsand Exchange
shortName: Gifts
repositoryId: 4
repositoryName: SC Office
shortName: SCO
repositoryId: 5
repositoryName: DC AfricanaArchivesProject
shortName: DCAAP
Table: Resources
Sample Record
repositoryId: 1
resourceId: 6
created: 2014-02-20 13:10:5037
title: Samuel Solomonpapers
dateExpression: 1932-1964
dateBegin: null
dateEnd: null
extentNumber: 36
extentType: linearfeet
displayCreator: Solomon,Samuel Joseph
displayRepository: Special CollectionsResearchCenter,The George WashingtonUniversity
resourceIdentifier1: MS2092
resourceIdentifier2: null
findingAidTitle: Guide to the Samuel Solomonpapers,
<date calendar="gregorian"era="ce">1932-1964</date>
findingAidDate: 2006
author: Processedby:Special CollectionsStaff;machine-readable findingaidcreatedby:
JenniferKing
descriptionRules: DescribingArchives:A ContentStandard
UsingphyMyAdmintocreate SQL querieswithArchivistToolkit
18
Table: ResourcesComponents
Sample Record
resourceId: 6
resourceComponentId: 2667
sequenceNumber: 0
title: Papers,
dateExpression: 1932-1964
resourceLevel: series
subdivisionIdentifier: MS2092 Series1
Table: ArchDescriptionRepeatingData
Sample Record
resourceComponentId: 2667
repeatingDataType: Note
sequenceNumber: 1
notesEtcTypeId: 31
title: Scope and Contentsnote
noteContent: Thisseriesconsistsof documentsfrom Samuel Solomon's career in aviation. He
was manager of the Washington National Airport; organized a new airline,
National Airways(the predecessorof NortheastAirlines) with Amelia Earhart in
1933; was presidentandtrainerof the War TrainingInstitute; andwasChairman
of the Airlines Committee for the United States Air Policy.
The materialsrange indate from 1932-64.
Table: NotesEtcTypes
Sample Record
notesEtcTypeId: 31
notesEtcName: Scope and Contentsnote
Sample Record
notesEtcTypeId: 8
notesEtcName: ConditionsGoverningAccessnote
UsingphyMyAdmintocreate SQL querieswithArchivistToolkit
19
Documentname: UsingphpMyAdmintocreate SQL querieswithArchivistToolkit
Documentname: AT-SQL-Tutorial
Documentversion: 1
Date: December2,2015
Author: Michael Cummings,ScholarlyTechnologyGroup

Mais conteúdo relacionado

Semelhante a Archivists toolkit SQL - a tutorial

ScrumDesk API Getting Started
ScrumDesk API  Getting StartedScrumDesk API  Getting Started
ScrumDesk API Getting StartedScrumDesk
 
Hands-on Lab: Migrating Oracle to PostgreSQL
Hands-on Lab: Migrating Oracle to PostgreSQL Hands-on Lab: Migrating Oracle to PostgreSQL
Hands-on Lab: Migrating Oracle to PostgreSQL Amazon Web Services
 
An introduction to weblogic console
An introduction to weblogic consoleAn introduction to weblogic console
An introduction to weblogic consolebispsolutions
 
Gerry Hughes Bi Portfolio
Gerry Hughes Bi PortfolioGerry Hughes Bi Portfolio
Gerry Hughes Bi Portfoliophilistineking
 
Getting started with entity framework 6 code first using mvc 5
Getting started with entity framework 6 code first using mvc 5Getting started with entity framework 6 code first using mvc 5
Getting started with entity framework 6 code first using mvc 5Ehtsham Khan
 
Mx Odbc
Mx OdbcMx Odbc
Mx Odbcfire9
 
How to-write-injection-proof-plsql-1-129572
How to-write-injection-proof-plsql-1-129572How to-write-injection-proof-plsql-1-129572
How to-write-injection-proof-plsql-1-129572Dylan Chan
 
digital marketing training in bangalore
digital marketing training in bangaloredigital marketing training in bangalore
digital marketing training in bangaloreVenus Tech Inc.
 
How To Check file exists and Delete PowerShell
How To Check file exists and Delete PowerShellHow To Check file exists and Delete PowerShell
How To Check file exists and Delete PowerShellVCP Muthukrishna
 
2013HT12504-Dissertation Report
2013HT12504-Dissertation Report2013HT12504-Dissertation Report
2013HT12504-Dissertation ReportSri Kumaran
 
Deploying Deep Learning Algorithm On AWS Cloud Platform.pdf
Deploying Deep Learning Algorithm On AWS Cloud Platform.pdfDeploying Deep Learning Algorithm On AWS Cloud Platform.pdf
Deploying Deep Learning Algorithm On AWS Cloud Platform.pdfLaveshLalwani1
 
High performance sql server workloads on hyper v
High performance sql server workloads on hyper vHigh performance sql server workloads on hyper v
High performance sql server workloads on hyper vManuel Castro
 
Dat 210 academic adviser ....tutorialrank.com
Dat 210 academic adviser ....tutorialrank.comDat 210 academic adviser ....tutorialrank.com
Dat 210 academic adviser ....tutorialrank.comladworkspaces
 
DAT 210 Education Specialist |tutorialrank.com
DAT 210 Education Specialist |tutorialrank.comDAT 210 Education Specialist |tutorialrank.com
DAT 210 Education Specialist |tutorialrank.comladworkspaces
 
To Study The Tips Tricks Guidelines Related To Performance Tuning For N Hib...
To Study The Tips Tricks  Guidelines Related To Performance Tuning For  N Hib...To Study The Tips Tricks  Guidelines Related To Performance Tuning For  N Hib...
To Study The Tips Tricks Guidelines Related To Performance Tuning For N Hib...Shahzad
 
Java script tutorial
Java script tutorialJava script tutorial
Java script tutorialDoeun KOCH
 

Semelhante a Archivists toolkit SQL - a tutorial (20)

ScrumDesk API Getting Started
ScrumDesk API  Getting StartedScrumDesk API  Getting Started
ScrumDesk API Getting Started
 
Hands-on Lab: Migrating Oracle to PostgreSQL
Hands-on Lab: Migrating Oracle to PostgreSQL Hands-on Lab: Migrating Oracle to PostgreSQL
Hands-on Lab: Migrating Oracle to PostgreSQL
 
An introduction to weblogic console
An introduction to weblogic consoleAn introduction to weblogic console
An introduction to weblogic console
 
Gerry Hughes Bi Portfolio
Gerry Hughes Bi PortfolioGerry Hughes Bi Portfolio
Gerry Hughes Bi Portfolio
 
Getting started with entity framework 6 code first using mvc 5
Getting started with entity framework 6 code first using mvc 5Getting started with entity framework 6 code first using mvc 5
Getting started with entity framework 6 code first using mvc 5
 
Mx Odbc
Mx OdbcMx Odbc
Mx Odbc
 
Keyword driven testing in qtp
Keyword driven testing in qtpKeyword driven testing in qtp
Keyword driven testing in qtp
 
How to-write-injection-proof-plsql-1-129572
How to-write-injection-proof-plsql-1-129572How to-write-injection-proof-plsql-1-129572
How to-write-injection-proof-plsql-1-129572
 
digital marketing training in bangalore
digital marketing training in bangaloredigital marketing training in bangalore
digital marketing training in bangalore
 
How To Check file exists and Delete PowerShell
How To Check file exists and Delete PowerShellHow To Check file exists and Delete PowerShell
How To Check file exists and Delete PowerShell
 
2013HT12504-Dissertation Report
2013HT12504-Dissertation Report2013HT12504-Dissertation Report
2013HT12504-Dissertation Report
 
Deploying Deep Learning Algorithm On AWS Cloud Platform.pdf
Deploying Deep Learning Algorithm On AWS Cloud Platform.pdfDeploying Deep Learning Algorithm On AWS Cloud Platform.pdf
Deploying Deep Learning Algorithm On AWS Cloud Platform.pdf
 
AWS essentials EC2
AWS essentials EC2AWS essentials EC2
AWS essentials EC2
 
Business objects51en
Business objects51enBusiness objects51en
Business objects51en
 
HTML_HHC
HTML_HHCHTML_HHC
HTML_HHC
 
High performance sql server workloads on hyper v
High performance sql server workloads on hyper vHigh performance sql server workloads on hyper v
High performance sql server workloads on hyper v
 
Dat 210 academic adviser ....tutorialrank.com
Dat 210 academic adviser ....tutorialrank.comDat 210 academic adviser ....tutorialrank.com
Dat 210 academic adviser ....tutorialrank.com
 
DAT 210 Education Specialist |tutorialrank.com
DAT 210 Education Specialist |tutorialrank.comDAT 210 Education Specialist |tutorialrank.com
DAT 210 Education Specialist |tutorialrank.com
 
To Study The Tips Tricks Guidelines Related To Performance Tuning For N Hib...
To Study The Tips Tricks  Guidelines Related To Performance Tuning For  N Hib...To Study The Tips Tricks  Guidelines Related To Performance Tuning For  N Hib...
To Study The Tips Tricks Guidelines Related To Performance Tuning For N Hib...
 
Java script tutorial
Java script tutorialJava script tutorial
Java script tutorial
 

Mais de Michael Cummings

General introduction to APIs
General introduction to APIsGeneral introduction to APIs
General introduction to APIsMichael Cummings
 
Enhancing a library OPAC with linked data
Enhancing a library OPAC with linked dataEnhancing a library OPAC with linked data
Enhancing a library OPAC with linked dataMichael Cummings
 
ELUNA2014: Developing and Testing an open source web application
ELUNA2014: Developing and Testing an open source web applicationELUNA2014: Developing and Testing an open source web application
ELUNA2014: Developing and Testing an open source web applicationMichael Cummings
 
ELUNA2013:Providing Voyager catalog data in a custom, open source web applica...
ELUNA2013:Providing Voyager catalog data in a custom, open source web applica...ELUNA2013:Providing Voyager catalog data in a custom, open source web applica...
ELUNA2013:Providing Voyager catalog data in a custom, open source web applica...Michael Cummings
 

Mais de Michael Cummings (6)

General introduction to APIs
General introduction to APIsGeneral introduction to APIs
General introduction to APIs
 
Enhancing a library OPAC with linked data
Enhancing a library OPAC with linked dataEnhancing a library OPAC with linked data
Enhancing a library OPAC with linked data
 
Linked data for Libraries
Linked data for LibrariesLinked data for Libraries
Linked data for Libraries
 
Cummingsdceluna2012
Cummingsdceluna2012Cummingsdceluna2012
Cummingsdceluna2012
 
ELUNA2014: Developing and Testing an open source web application
ELUNA2014: Developing and Testing an open source web applicationELUNA2014: Developing and Testing an open source web application
ELUNA2014: Developing and Testing an open source web application
 
ELUNA2013:Providing Voyager catalog data in a custom, open source web applica...
ELUNA2013:Providing Voyager catalog data in a custom, open source web applica...ELUNA2013:Providing Voyager catalog data in a custom, open source web applica...
ELUNA2013:Providing Voyager catalog data in a custom, open source web applica...
 

Último

20240412-SmartCityIndex-2024-Full-Report.pdf
20240412-SmartCityIndex-2024-Full-Report.pdf20240412-SmartCityIndex-2024-Full-Report.pdf
20240412-SmartCityIndex-2024-Full-Report.pdfkhraisr
 
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...gajnagarg
 
High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...
High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...
High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...kumargunjan9515
 
Top Call Girls in Balaghat 9332606886Call Girls Advance Cash On Delivery Ser...
Top Call Girls in Balaghat  9332606886Call Girls Advance Cash On Delivery Ser...Top Call Girls in Balaghat  9332606886Call Girls Advance Cash On Delivery Ser...
Top Call Girls in Balaghat 9332606886Call Girls Advance Cash On Delivery Ser...kumargunjan9515
 
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...Elaine Werffeli
 
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...HyderabadDolls
 
Lecture_2_Deep_Learning_Overview-newone1
Lecture_2_Deep_Learning_Overview-newone1Lecture_2_Deep_Learning_Overview-newone1
Lecture_2_Deep_Learning_Overview-newone1ranjankumarbehera14
 
Ranking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRanking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRajesh Mondal
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNKTimothy Spann
 
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...gajnagarg
 
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptxRESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptxronsairoathenadugay
 
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...Bertram Ludäscher
 
Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...
Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...
Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...gragchanchal546
 
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With OrangePredicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With OrangeThinkInnovation
 
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...HyderabadDolls
 
Fun all Day Call Girls in Jaipur 9332606886 High Profile Call Girls You Ca...
Fun all Day Call Girls in Jaipur   9332606886  High Profile Call Girls You Ca...Fun all Day Call Girls in Jaipur   9332606886  High Profile Call Girls You Ca...
Fun all Day Call Girls in Jaipur 9332606886 High Profile Call Girls You Ca...kumargunjan9515
 
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...HyderabadDolls
 
Digital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareDigital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareGraham Ware
 
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...gajnagarg
 
Aspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - AlmoraAspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - AlmoraGovindSinghDasila
 

Último (20)

20240412-SmartCityIndex-2024-Full-Report.pdf
20240412-SmartCityIndex-2024-Full-Report.pdf20240412-SmartCityIndex-2024-Full-Report.pdf
20240412-SmartCityIndex-2024-Full-Report.pdf
 
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
 
High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...
High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...
High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...
 
Top Call Girls in Balaghat 9332606886Call Girls Advance Cash On Delivery Ser...
Top Call Girls in Balaghat  9332606886Call Girls Advance Cash On Delivery Ser...Top Call Girls in Balaghat  9332606886Call Girls Advance Cash On Delivery Ser...
Top Call Girls in Balaghat 9332606886Call Girls Advance Cash On Delivery Ser...
 
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
 
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
 
Lecture_2_Deep_Learning_Overview-newone1
Lecture_2_Deep_Learning_Overview-newone1Lecture_2_Deep_Learning_Overview-newone1
Lecture_2_Deep_Learning_Overview-newone1
 
Ranking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRanking and Scoring Exercises for Research
Ranking and Scoring Exercises for Research
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
 
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
 
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptxRESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
 
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
 
Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...
Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...
Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...
 
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With OrangePredicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
 
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
 
Fun all Day Call Girls in Jaipur 9332606886 High Profile Call Girls You Ca...
Fun all Day Call Girls in Jaipur   9332606886  High Profile Call Girls You Ca...Fun all Day Call Girls in Jaipur   9332606886  High Profile Call Girls You Ca...
Fun all Day Call Girls in Jaipur 9332606886 High Profile Call Girls You Ca...
 
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...
 
Digital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareDigital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham Ware
 
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
 
Aspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - AlmoraAspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - Almora
 

Archivists toolkit SQL - a tutorial

  • 1. UsingphyMyAdmintocreate SQL querieswithArchivistToolkit 1 Contents Loggingin through the web interface...................................................................................................2 Search................................................................................................................................................4 Structure............................................................................................................................................5 Browse...............................................................................................................................................6 SQL – one table selected.....................................................................................................................7 SQL multiple table query.....................................................................................................................8 Printing or Exporting results..............................................................................................................12 Appendix..........................................................................................................................................17
  • 2. UsingphyMyAdmintocreate SQL querieswithArchivistToolkit 2 Logging in throughthe web interface 1. Login at http://the serveraddress/phpmyadmin User: atdbread Password: [see C.Peterson] 2. Select‘toolkit’
  • 3. UsingphyMyAdmintocreate SQL querieswithArchivistToolkit 3 Thisdocumentcoverssome basicsof usingSQL queries. We won’tuse these features:  Query  Operations  Privileges  Tracking  Designer We shouldbe usinguseraccount ‘atdbread’ that hasread-only rights. This documentwill showscreensfromMike’sadmin accountincluding optionsto delete records,and otheractionsthat are notavailableto the useratdbread. Featurescoveredin this documentinclude:  Search  Structure  Browse  SQL o Print o Export The directionsprovide examples.The readermayenterthe textshownin redfont.
  • 4. UsingphyMyAdmintocreate SQL querieswithArchivistToolkit 4 Search Example:Goto the Search tab; entersearchforSnyder,Mitch clickGo Returnsresults:
  • 5. UsingphyMyAdmintocreate SQL querieswithArchivistToolkit 5 Structure Selectthe Structure tab Showsnumberof rows in eachtable,there are 1,016 Accessionsrecords. Example: Selectthe Accessions table toview the structure of aspecifictable. Returnsfieldlist,propertiesof fields.
  • 6. UsingphyMyAdmintocreate SQL querieswithArchivistToolkit 6 Browse Selectthe Browse tab.Clicka table name onthe listof tables,e.g.,Accessions. Letsyou browse recordsina table. The Appendix of thisdocumentlistssome same datafromimportanttablesinthe system.The sample data showsthe “id” fieldsthatyouneedtoknow inorderto create SQL statementsthatgetfieldsfrom more than one table.
  • 7. UsingphyMyAdmintocreate SQL querieswithArchivistToolkit 7 SQL – one table selected Selectthe SQLtab A defaultquerywilldisplayforthe chosentable.Select*meansselectall fieldsinthe table. We will onlybe usingthe SELECTcommand. Notice a listof fieldsor‘columns’forthe chosentable is shownonthe right-handside of the screen.
  • 8. UsingphyMyAdmintocreate SQL querieswithArchivistToolkit 8 SQL multiple table query The general syntax of an SQL query isto identifythe fieldsyouwantinthe “select” clause,thenlistthe tablesinthe “from” clause. Inthe “where” clause youidentifywhichidfieldsare commonbetweenthe tables,andoptionallyanyconditions.The optional “orderby” clause may be usedtospecifysorting preference. Example:Copyandpaste thissample queryintothe querybox: SELECT Resources.resourceId, Resources.resourceIdentifier1, Resources.title asResourceTitle, ResourcesComponents.title asComponentTitle, ResourcesComponents.resourceLevel, ResourcesComponents.resourceComponentIdasComponentIdentifier, ResourcesComponents.restrictionsApply, ArchDescriptionRepeatingData.title asNoteType, ArchDescriptionRepeatingData.notesEtcTypeId, ArchDescriptionRepeatingData.noteContent FROM `Resources`,`ResourcesComponents`,`ArchDescriptionRepeatingData` WHERE Resources.resourceId=ResourcesComponents.resourceIdAND ResourcesComponents.resourceId=ArchDescriptionRepeatingData.resourceIdAND ArchDescriptionRepeatingData.notesEtcTypeIdIN ('8','9','31') ORDER BY Resources.resourceId,ComponentTitle; Thenclickthe GO button
  • 9. UsingphyMyAdmintocreate SQL querieswithArchivistToolkit 9 Resultsof query.Thisqueryreturnedover72 thousandrows!Itshows30 rows at a time,andyou can scroll horizontallytosee the contentsof the fields. Click‘Showquery box’to editthe query Try this: Editthe WHERE clause,adding aconditiontolistonlyMS0253: WHERE Resources.resourceId=ResourcesComponents.resourceIdAND ResourcesComponents.resourceId=ArchDescriptionRepeatingData.resourceIdAND ArchDescriptionRepeatingData.notesEtcTypeIdIN ('8','9','31') AND Resources.resourceidentifier1='MS0253' ThenclickGO button
  • 10. UsingphyMyAdmintocreate SQL querieswithArchivistToolkit 10 Resultsof revisedquery,42rowsselected. Exercise toretrieve extentsinDCAAP 1. Findinformationabout repositories,includingthe importantrepositoryId a. Selectthe SQLtab i. Enter thisqueryandclickGo select* from`Repositories`; ii. Note the DCAAPrepositoryidis5. Let’sfindthe extentsof Resourcesassociated withDCAAP: b. Selectthe SQLtab i. Enter thisqueryandclickGo (note the fieldnamesare enclosedinbackticksinthe selectclause,but the fieldname inthe where clause isnot.The value inthe where clause isenclosedinsingle quotes;the statementendsinasemicolon.) select`title`,`extentNumber`,`extentType` from`Resources` where Resources.repositoryId='5';
  • 12. UsingphyMyAdmintocreate SQL querieswithArchivistToolkit 12 Printing or Exporting results Scroll to the endof the queryoutput. Selectthe Printview(with full texts) to geta printoutthatlookslike the example below.
  • 13. UsingphyMyAdmintocreate SQL querieswithArchivistToolkit 13 Selectthe Export option. The followingoptionselector displays(the defaultFormatmaysay SQL): Choose Quickor Customdisplayoptions. Choose a Format,e.g.,CSV forExcel Clickthe Go button The file will be downloadedtoyourworkstation,asinthisexample,Resources.csv
  • 14. UsingphyMyAdmintocreate SQL querieswithArchivistToolkit 14 Start a new spreadsheetinExcel Go to the Data tab, clickthe “From Text”option Selectthe file toimport Clickthe Importbutton
  • 15. UsingphyMyAdmintocreate SQL querieswithArchivistToolkit 15 Complete the stepsinTextImportWizard Note: SelectOtherfromthe Delimiterssection,andenterasemicoloncharacterinthe box. The fieldsshouldlooklike thisscreenshot:
  • 17. UsingphyMyAdmintocreate SQL querieswithArchivistToolkit 17 Appendix Sample data Table: Repositories repositoryId: 1 repositoryName: Special CollectionsResearchCenter,The George WashingtonUniversity shortName: Spec repositoryId: 2 repositoryName: Global ResourcesCenter shortName: GRC repositoryId: 3 repositoryName: Giftsand Exchange shortName: Gifts repositoryId: 4 repositoryName: SC Office shortName: SCO repositoryId: 5 repositoryName: DC AfricanaArchivesProject shortName: DCAAP Table: Resources Sample Record repositoryId: 1 resourceId: 6 created: 2014-02-20 13:10:5037 title: Samuel Solomonpapers dateExpression: 1932-1964 dateBegin: null dateEnd: null extentNumber: 36 extentType: linearfeet displayCreator: Solomon,Samuel Joseph displayRepository: Special CollectionsResearchCenter,The George WashingtonUniversity resourceIdentifier1: MS2092 resourceIdentifier2: null findingAidTitle: Guide to the Samuel Solomonpapers, <date calendar="gregorian"era="ce">1932-1964</date> findingAidDate: 2006 author: Processedby:Special CollectionsStaff;machine-readable findingaidcreatedby: JenniferKing descriptionRules: DescribingArchives:A ContentStandard
  • 18. UsingphyMyAdmintocreate SQL querieswithArchivistToolkit 18 Table: ResourcesComponents Sample Record resourceId: 6 resourceComponentId: 2667 sequenceNumber: 0 title: Papers, dateExpression: 1932-1964 resourceLevel: series subdivisionIdentifier: MS2092 Series1 Table: ArchDescriptionRepeatingData Sample Record resourceComponentId: 2667 repeatingDataType: Note sequenceNumber: 1 notesEtcTypeId: 31 title: Scope and Contentsnote noteContent: Thisseriesconsistsof documentsfrom Samuel Solomon's career in aviation. He was manager of the Washington National Airport; organized a new airline, National Airways(the predecessorof NortheastAirlines) with Amelia Earhart in 1933; was presidentandtrainerof the War TrainingInstitute; andwasChairman of the Airlines Committee for the United States Air Policy. The materialsrange indate from 1932-64. Table: NotesEtcTypes Sample Record notesEtcTypeId: 31 notesEtcName: Scope and Contentsnote Sample Record notesEtcTypeId: 8 notesEtcName: ConditionsGoverningAccessnote
  • 19. UsingphyMyAdmintocreate SQL querieswithArchivistToolkit 19 Documentname: UsingphpMyAdmintocreate SQL querieswithArchivistToolkit Documentname: AT-SQL-Tutorial Documentversion: 1 Date: December2,2015 Author: Michael Cummings,ScholarlyTechnologyGroup