Page3of43
Introduction
ThisSQLitegettingstartedguideisusedbystudentsenrolledintheMasterofScienceinSoftwareDevelopmentand
otherComputerScienceDepartmentprogramsinbothon‐campusandonlineprograms.Thedocumentdescribes
SQLite,connectingtoSQLiteinEclipseandIntelliJ,andworkingwithyourfirsttable.Notethatasnewversionsof
SQLitearereleased,someofthescreensmaylookdifferentthanthescreenshotsinthisdocument.Nevertheless,
thisguidewillhelpgetyoustartedquicklyonanymodernversionofversionofSQLServerExpress.
Whyislearningaboutdatabasesimportant?Mostseriousapplicationshavetheneedfordurablestorage,thatis,
storinginformationforanextendedperiodoftime.Whilestoringinformationinfilessatisfiestheneedsforsome
applications,manyrequireuseofadatabase.Databasessupportfoursignificantfeaturesnotsupportedwellbyfile
systems–efficientdataaccessamongstlargesetsofdata,extremelygranularsecurity,highlystandardized,cross‐
platformAPIs,andstructuralindependence.Databasessupportretrievinginformationquickly,oftentimeslessthan
asecond,fromvastamountsofdata.Databasessupportsecurityevendowntoindividualfieldsinanextensible
manner.DatabaseshavehighlystandardizedAPIsforcross‐platformaccess.Lastly,applicationsthatusedatabases
arenotdependentuponanyparticularfilesystemorfilestructure.Databasesprovidefeaturesneededbymany
seriousapplications.
Relationaldatabasesarebyfarthemostuseddatabasesintheworld.Estimatesputworldwideusageatabout77%
relational,and23%NoSQL/Search(SolidIT).Whendatamustbesharedacrossmanyclientsand/orserversofan
application,server‐baseddatabasesareutilized,themostpopularbeingOracle,SQLServer,MySQL,andPostgres
(SolidIT).Whendatadoesnotneedtobesharedortheneedforsharingisverylimited,embeddeddatabasescan
beutilized,themostpopularbyfarbeingSQLite(SolidIT).
Ifyoucan’tdeterminehowtoproceedorsomethinggoeswrong,andwebsearchesdon’thelp,askyourfacilitator
orinstructorforhelp.Goodluck,andhavefun!
SQLite Overview
SQLiteisthemostused,embedded(serverless)relationaldatabaseintheworld.Itisopensourceandfreetouse.
Unlikeserver‐baseddatabaseslikeOracleandSQLServer,SQLiterunsentirelyintheapplicationthatusesit,and
storesallofitsdurableobjectsinasinglediskfile.SQLitecanbeusedacrossallmajorplatforms,whichmeansthe
databasefilecanbefreelycopiedandusedacrossdeviceswithdifferencearchitectures.SQLiteisidealfor
applicationsthatwouldtraditionallyusefilestostoredata,givingthemaccesstothepowerofarelationaldatabase
withouttheexpenseandoverheadofinstallingandmaintainingaserver‐baseddatabase(SQLite).
AlthoughSQLiteisnotareplacementforOracle,SQLServer,orPostgres,thegoodnewsis,onceyoulearntoaccess
anduseanyonemodernrelationaldatabase,youcanusetheotherswithoutmuchadditionaleffort.Allmodern
relationaldatabasesutilizetheStructuredQueryLanguage(SQL)fordataaccessandmanipulation.SQLishighly
standardizedacrossdatabases.Althoughtherearesomedifferences,thesignificantaspectsarethesameacross
databases.Inaddition,JavasupportsastandardizedAPI,JDBC,foraccessinganydatabase.ConnectivityfromJava
doesnotdiffermuchbetweendatabases.ThusSQLiteisanexcellentfirstdatabaseforJavadevelopers,becausethe
intricaciesofrelationaldatabasesandconnectivitycanbelearnedwithouttheoverheadofdatabaseinstallation,yet
SQLiteisusedinseriousapplicationsworldwide.
Supported Platforms
SQLitesupportsallmajorplatforms.IfyouareusingWindows,aMac,Linux,anAndroidphone,aniPhone,andsome
otheroperatingsystems,youcanuseSQLite.Forthesakeofbrevity,theexamplesandscreenshotsinthisdocument
arefortheMicrosoftWindowsfamily,includingWindows8andWindows10.However,pleasekeepinmindyoucan
followthesamestepsforotheroperatingsystems;yourscreensmaylookalittledifferent,butalmostallofthe
stepsarethesame.