Now I dohavetowarnyou, andyouhavetowarnyou, ifyouareanexpertindatabases, turnbacknowturnback.
Nowleave.
Goaway!
WatchgameofThrones.
Thewaythat I'm goingtoprobablydothisintroductiontodayismostlikelygoingtopissoff a lotofoldschooldatabaseadministrators, becausetheproblemthat I haveiswhen I amtalkingtopeople, I amtalkingtonewpeople.
Andso I havetofindsomeplacetostartinordertogivefolkscontextforeverythingelsethat I talkaboutlater.
Andsooneoftheissuesyourunintowhenyou'redoingintroductoryclassesisyoufrustrate a lotoftheoldtimersbecausethey'relikethat's That's notHowardis a lorry, andyou'relike, Well, yeah, youknow, intherealworld, itgets a lotmorecomplex.
And, ah, there's a lotofstuffintherealworld, but I havetofindsomeplacetostartfrom.
Andso I amgoingtobestartedbytalkingaboutrelationaldatabases.
I thinkthisis a goodplacetostartwhenwestarttalkingaboutdatabases, especiallyinthecloudcomputingworld, becausewe'relikerelation.
Basically, relationaldatabasesisjustonewaythat's beenaroundforquite a longtimenow.
Andifyou'regoingtobedealingwithdatabasessuchasmysequeldatabasesorMariadebe a lotofthedifferenttypesofdatabasesoutthere, basicallythey'regoingtobe a relationaldatabases.
Soifyouare a databaseexpert, letmebeclear.
Yeah, I know.
I'm glossingover a lotofcrap.
It's anintroductoryclass, gotmaycutme a breakhere, right?
Sowhenwestarttalkingaboutdatabases, theimportantthingtoberealizingwhenyou'retalkingaboutdatabasesisall a databasedoes, oralldatabasesoftwareor a servicedoes.
Isitstoresdatain a waythatisveryeasy, basicallytosearchforandtobeabletomodify.
Sothat's allOh, a databaseserverdoes.
Sothisisveryimportantbecause a lotoftimeswhenpeoplestartinteractingwithdatabasesforthefirsttimedon't use a pieceofsoftwaresuchasaccess.
Soaccessis a pieceofdatabasesoftwarethatMicrosoftcreatesandthewaytheMicrosoftdoeseverything, whichisgoodfrom a productionstandpoint.
Butit's horriblefromaneducationstandpoint.
Theygot a bundle.
Everythingtogether s sowhatyou'redoingwithaccessdatabases.
Sobasically, thefrontendiseither a like a websitethatyougotoorsomekindofapplicationhasbeencreatedforyourwindowsoryouriPhoneorwhateverelse.
Thentherewillbeintelligent, sobasicallyyouhavethefrontend, andthenyoucodeyoucodeforthatfrontendtobeabletocommunicatewithyourdatabaseesosuchas, likeifyou'redealingwithsomethinglike a WordPressordribble.
Basically, youhave a frontendofthatfrontendis 80 MelandCSSandthattypeofthingyouhave a mysequelbackend, andthenyouusePHP.
Sobasically, whenyouinsertdataSowhenyoucreate a useraccountorwhenyoucreate a postorsomethinglikethat, basicallyPHPtakesthatinformationandthenwithPHP, thatinformationistheninputitintothedatabase.
Whenyougotoread a postoffofsomethinglikeWordPressandyouclickthelink, whathappensthereisPHPgoes, findstherecordsassociatedwiththatpostit, thenpullsthatoutofthedatabasedependingontheformattingthanfourmats.
Sothatkindofgivesyou a littlebitof a briefideawhatwe'retalkingaboutwiththedatabasesjusttokindofgetyou, getyouintherightmindsethere.
Sonowthatyouhave a briefideaofwhat a databases, let's gooverthewhiteboardso I candrawsomethingsouttotrytogiveyou a visualrepresentationofwhat's goingon.
So I thinkit'llmake a littlebitmoresenseforyou.
Solet's kindofdrawthisout.
Let's do a littlebitof a diagramofhowthiswholedatabasesystemworksandhowclientsaregoingtobeinteractingwithitNow.
Theimportantthingtobethinkingaboutwhen I starttalkingaboutyouknowthedatabaseisthatthemodernworldofdatabaseshasbecomemuchmorecomplicatedthanhowitusedtobe.
So I amtryingtogiveyou a basisheresothatwhenyoustartreadingandlearningmoreaboutdatabaseisgoingintothefuture.
Youhave a baseideaofwhat's supposedtobegoingon, andthenyoucanunderstandwhatfunctionsorfeaturestheproductthatyou'relookingatoffers.
So, basically, intheolddays, intheolddayswehad a server.
WehadtheserverwiththegoodoldCPUfanonit, right?
Soyouhavethathehavethephysicalserver.
Youhaven't OSinstalledontheserver.
AndthenontopofthatOS, youhave a databasesuchasmysequelinstalled.
Thefirstunityou'regoingtodealwithis a database, right?
Sothedatabaseisthehighestunitthatyou'regoingtobedealingwithwithin a databaseserversoyoucanhave a database.
So, like a lotoftimeswithdatabases.
Soifyou'rehavingahWordPresswebsitesSoWordPresswebsitesconnectbackto a mysequelbackEnd.
Sowetalkabout a backend.
We'renormallytalkingabout a databaseserver, soitcommunicateswith a mysequelbackend.
Soforlikeme, I haveah, Eli, thecomputerguydotcom.
Right?
SoEli, thecomputerguydotcom, usesWordPress.
AndsoforEli, thecomputerguydotcom, thereis a specificdatabasefortheinformationforEli, thecomputerguydotcomonthesameserver.
I have a websitecalledFailnormaldotcom, andithasitsowndatabase.
Sothedatabaseiskindofliketherouterightthatit's thehighestlevelthatwe'regoingtobedealingwithwhenwe'redealingwith a databaseserver.
Thenfromthere, basically, youhavesoftwarethat's beenencodedtobe a pushandpulldatatothatparticulardatabase.
SoifyougotoEli, thecomputerguydotcom, right, yougoto a website, yourcomputerguydotcom, andyouseeallkindsoffancystuff.
They'rebasicallywhat's happening, right?
So I havemyWebserver.
MyWebserverhasPHPinstalled.
AndsothePHPprogramminglanguageiscommunicatingwiththeEli, thecomputerguydotcomdatabase, anditbasicallypushingandpulling a datafromthatdatabase.
Sowhen I sitdownand I write a postso I sitdownand I write a postandthen I clickthelittlepublishedbuttonthatthensendsalleverythingthat I'vewrittenforthatposttothedatabaseonthedatabaseserverandthenthat's writtenthere.
Andbasicallyit's abletopullallofthatinformationtogethersothatwhenoneofyourusersgoesto a website, theygettherecommendedrecommendationsthataremostappropriatetothem.
Soitisimportant, understand, whenwetalkaboutthesedatabasefiles, theyarethehighestlevelofstoragewithin a databaseserver.
Theytrytodumpwaytoomuchcrapinto a singledatabasebecausethere's thiskindofthisidealike, Oh, thedatabaseisthelargest, likethat's thelargestunit I canhave.
Soyouhave a usertableofposttablepagestableandagainifyougoinandyouactuallylookat a wordpressdotcomawardpressdatabase, I thinkit's like 20 or 30 differenttablesofdifferenttypesofinformationthathavetobestoredwheretheystorethemindifferenttablestomakeiteasiertobe a grewinministerandmanageagain.
That's oneofthebigthingstobethinkingaboutis a realizingprofessionalistrying, tryingtocompartmentalizecontentandthingsintointorationalunits.
Sobasicallysomebodycango.
Oh, I needtoseewhattheuserinformationis, and I cansimplygototheusertablewithintheEli, thecomputerguydotcomdatabase.
Billyisage 12 andsayYousay, Well, wait a minute, Eli, Theserecordsareidentical.
When I when I askedforthisinformation, I gotthreeidenticalBobBilly, age 12.
Butwhatmaynotbeprintingoutonthatreportthatyou'relookingatisthatthere's a customer I d fieldandsothisBabaBilly a 12 mayberecord 101 inthisBobBilly A 12 mayberecord 1000 andoneinthisBobBilly A 12 Mayberecord.
I'm 55.
Andso I know, likerightnowthatmaynotseemyoumaybelike, Well, I don't understandwhythatmatters, buttheimportantthingisiswhenyou'redoingsearches, whenyou'retryingtomodifyrecords, whenyou'redoingthattypeofthing, youneedsomekindofuniqueideafortherecordsthatyou'redealingwithorthingsaregoingtogetreally, reallybad.
Sonowwegetintowhen I talkabout a relation A lldatabase.
Whatdo I meanby a relationaldatabase?
Soscrolldownhere.
Solet's startwiththeoveralldatabase.
Soagainwehavetheoveralldatabasehere.
Andlet's forthis.
Let's saytalkaboutaninventorydatabaseorsalesdatabase, Let's sayandsowe'regoingtohave a multipledifferenttableshere.
Sowe'regoingtohave a customertable.
Thenlet's saywe'regoingtohave a partstableandthenwe'regoingtohaveanordertable, right?
Sowe'regoingtohavethesethreedifferenttables.
Sothenwegoin, wetake a lookat, let's say, thecustomertable.
We'regonnahave a tableforthecustomer, right?
Andso, inthecustomertableagain, uphereforthecolumnswillhave a customer, I d.
Thenwe'llhavewhat's a firstname, andthenwe'llhaveah, lastnameandthenwe'llhavenotes.
Right.
Sothisisthedifferentinformationhere.
Andsointhis, thenwehavetherose.
Sothesearetherecordswehave.
Customer.
I D.
1234 1stnameSueLastnameBillNotes.
Firstname.
Tim.
Lastname.
Stephensnotes.
CustomerthreeisBoblastnameBilly.
Andthenthere's notesandthencustomer.
Four.
As I don't know, Ralph, Tim's badwithcomingupwithnamesnotes.
Right.
Sothisisthecustomertable, right?
It's a customertable.
You'rethecustomer i d.
Firstname, lastnamenotesandagainforthistable.
Yougot a wholebunchofinformationhere.
Youcanhavethisthreetodressyougotonthestate.
Youhave a tax i d.
Numberlotsandlotsandlotsandlotsofthings.
Doyourealizewhenyou'redealingwith a tablethatit's notreallythatyou'reworriedaboutthetablesize?
Notreally.
Thatwhatyou'reworriedabout, Howmanyfields a tablecontainsTherealthingwhenyou'redealingwith a tableisthatitmakes a logicalsense, rightwhensomebodysitsdownandthey'relike, Oh, I havetomodifythedatabase.
Why, thiscouldbecome a problemismanytimesintherealworldof I T departmentsisyouhave a databaseadministrator, soyouhavethepersonthat's responsibleforthemysequeldatabaseortheOracledatabase, andthenyouhavethecoders.
Sothisisoneofthethingsthatcouldbe a littlebitcomplicated, isbasicallyhavingthecodersandhavingthedatabasepeoplemakesurethatthey'reonthesamepagewithsomethingcalledtheSchemer.
Soyou'regoingtohavetohave a physicalmachinethatis, a physicalmachineisgonnahaveanOSandoninstalledonit.
Ontopofthat, you'regonnahavemysequelorMariaTBormongo D beinstalledontopofthat, andthenwithinthatyou'regoingtohaveallofyourdatabases, andthenyourapplicationsaregoingbeabletocommunicatewithit, butyouaregoingtobedealingwith a server.
Andagain, theoldschoolwayofdealingwiththisisyouhave a server.
Andsoifyouhave a server, thenyouhavetostartthinkingaboutthingslikewhatisthebestwayforyouruserstobeabletoaccessdataoffoftheservers?
Whataboutreliabilitywithoutresiliency?
If a hurricanecomesthrough, whenliterallywipesawayallofyourserversandwhatyoudonext?
Andsothat's whenyoustartgettingintothingslike a databaseserverclustering, andthenyoustartthinkingabouthowyouwantthedatabaseserverstooperate.
SoiftheInternetconnectiongetscut, oranyotherstupidthingsthathappennormallyinthecourseofbusiness, theyarestillabletoreadfromthedatabaseBecauseyoudon't wanttoreadwritedatabaseoutinthefield, whereanylittlehackercansimplywalkinthedoor, plugin a pieceofequipmenttothatparticularserverandstartputtingdown a inthatwillgetreplicatedbacktoyourmainservers.
Well, that's where a programminglikewejustcomein, right?
So, basically, withtheprogramminglanguage, whatyoucanhavehappenisbasically, whenyou'rewritingoutyourscript, youcansay, likewhensomebodygoestothewebsite, youknow, pull.
Youknow, Dad, a polldatabasicallyfromlocalserversoyoucansetitupsowe'llsay, pulledoutoffromlocalserverandthenwritedatabacktohomeserversoyoucanhaveactuallyhaveitsetup.
Sowhenyouhave a useratyourremoteofficeandtheypullup a Webpagewhentheygotolookupinformationwhenyou'regetting a report, itsimplyispulledfromthatlocalserver.
Youhave a bunchofwriters, andsowhatyoucoulddoisyoucanhave a databaseserverinsideyourbuilding.
Yourwritersareabletowritetothatdatabaseserver.
Sowhentheywrite a postrightwhentheywrite a post, whentheywriteanarticlethatwillgetwrittentothatserverandthenyouhave a mysequelordatabaseserverupinthecloud, andbasically, oncetheywritetoyourlocalserver, itwillsendsimplythenreplicateouttothatreadserver.
Theygiveitreadrightaccess, andit's inthesameeffing a buildingatthesamefacility.
It's onthesamesubnetornetworkiseverythingelse, andsoyouhave a maliciousactor.
I wasabletodosomethingcalled a sequelinjectionattackthere, thenabletogaincontrolofthatsequelserverandthen, oncethey'vegainedcontrolofthesequelserverallhellbreaksloose.
Ifyouhave a readonLeeServerthatsittingupinthecloud, theonlywayitgetscommunicatedtobuyyourinternalinfrastructureissimplybyoutgoing, basically, databaseupdates.
So I thinkbystartingwithrelationalldatabaseskindoftalkingabouttheold, howtheolddatabaseserversworked, talkingaboutagainthedatabasesthemselves, talkingaboutthetables, thecolumns, therecords, talking a littlebitaboutread, right.
Youknow, thosetypesofserversandclustering I thinkthisis a goodplacetostartfrom.
Andthenyoucangooutandyoucanstartunderstanding a littlebit, Maurwhatyou'relookingatwhenyoudostarttoresearchdatabasesagain.
Peopleyoudon't realizelikebeing a databaseadministrator, being a databaseadministratorforoneparticularproduct.
That's a jobthat's a job.
Forsomereason, I don't knowwhyitisspeoplejustkindofoverlookeddatabases, andthey'rejustlikeYeah, youknowthatlittlebackinbeing.
Butinrealityagain, whenyoustarttalkingaboutmultipleserverswhenyoutalkaboutmillionsorbillionsofrecords, whenyoutalkaboutallthesethings, thingsgetcomplicatedveryquickandagain, itrequires a lotofmaintenancethatrequires a lotofunderstanding.