Somethingcalled a blobdatatypeintomysecretdatabase.
Isit a date?
Isitanynumberofdifferenttypesofdatatypesthatcouldbe a valueinyourdatabase?
Now, whyisitimportanttodesignatewhatsomethingis?
Whyisthatimportant?
Todesignatethatsomethingistextorsomethingisanendorsomethingis a floator a decimalor a blobsoonandsoforth?
Well, oneoftheproblemsyourunintointherealworldwhenyouput a databaseinto a productionenvironmentisatsomepointyou'regoingtohave a frontencoderthatdoessomething.
AsanineLeestupid.
Righttheresittingthere.
They'vebeenworking 100 hoursthatweek.
They'retryingtoget a get a frontendanddeployedsomekindofsubmissionform.
Sobasically, somebody's goingtosubmittheirnames, alwaysgonnasubmittheirtheirage, their T shirtsize, whateverelse, andthat's goingtopopulateyourdatabase.
Theworstthingthatcouldhappentoyouisifonlyoneortwovaluesareabletobeinputtedintotheimproperplacewithin a databasethatcancauseyou a massive, massiveissue.
Sobasically, allwe'retalkingaboutwhenwe'retalkingaboutthedatatypeshereiswe'rejusttalkingaboutwhattypeofdataisablebeinputtedas a valueinto a particularcolumnwithin a database.
Sowiththat, let's gotothecomputerso I canshowyou I canshowyouonepage.
That's kindof a feat.
Shegivesyousomeexplanationofthesedifferentdatatypes, andthenwe'llgototheactualmysequelreferencewhereitgetsmuchMaurEndoftheweedsandmaybemoreimportantforyouagain, ifyou'reifyou'reactuallygooutandstartdesigningthingsthatwillbegoinginto a productionenvironment.
A 1,000,010,000 oftheirendswhereas a floator a decimal, wouldbe 10 not 99 or $11.25 or 1,000,026 250.33 typeofthingifyougoandyoutake a lookat a speckthing, whatthisistellingyouisbasicallyhowmanycharacterscanyouinsertintothevaluesforhischargoing 0 to 255 charactersfor a tinytext, thesamefor a small, andyoucangofromanywherefrom a negative 1 28 to 1 27 on.
I liketheblobseso I do a dailytalkshoworslightlydailytalkshowcalledTheDailyBlob, or, I guess, kindoframbleaboutrandomthingsthat I wanttotalkaboutandandwherethenamefortheDailyBlobcamefromistheblobdatatypes.
Sowehave a databasethathastoreplicatethedatatotwootherdatabaseservers, right?
Soifyouputlargefilesintothedatabaseitself, thatcouldbeturnedinto a completemessfromanarchitecturestandpoint.
Sowhatpeoplehaverealizedis a betterwayofdoingthingsisyoustore a fileonto a fileserverandas a sandorwhateverelse, andthenbasically, youputthelinktothefileinthedatabase, andthenthedatabasesystemonlyhastoreplicatethelink.
Andoneoftheimportantthingstobelookingatisagainget a littlebitmoreinformationonhowthesethesedatatypesworkintherealworld, especiallyifyou'rewalkinginbehindsomebodyelse.
Andthey, perhapstheypercansgot a littletoospecificwithherdatatypesbecause, remember.
Butoneoftheoneofthepointsofthedatatypeistoconstrainthetypeofdatathatcangointo a valueand a copinto a columnsothatyoudon't runintoproblemslater.
Well, oneoftheissuesiswhensomebody's initiallyCodynowon a databasesettingupthedatabase, theymaybe a littlebittoorestrictiveandthenthingsasthingsgrowasasthingsgetmodified, youmaystartrunningintoproblems, andyoumaynotknowwhyyou'rerunningintothoseproblemsesolikewiththis.
Sothey'retalkingaboutdecimals, Sodecimalsis a typeofdatatypeon, sothey'recreating a salaryvalueandthatsalaryvalueisgoingbe a decimal.
Andthenifyoustartrunningintoproblemswithyourownsystem, itmaybe a littleissueslikethisthat's causingyouproblems.
Sonowtheyhave a betterideaofwhatdatatypesarenowweneedtostarttalkingaboutvalidationonthefrontendanddatabasebigknowledgemomentstothefrontandsothatyoudon't runintomajorproblemswhenyoustartdesignedyourapplication.
Soas I talkedaboutbefore, literallytheworstthingthatcanhappentoyouwith a databasesandwhenthewrongtypeofdataisputintothewrongfieldandthenyouhavesomethingsuchasaddinguporbasicallyhaveanykindofmathematicalalgorithmrunandbasicallyyoucanget a completemess.
It's whatformvalidationisisyouuse a programminglanguagesuchasJavascript.
So a job, A script, basicallyinrealtime.
It's a clientside.
Ah, scriptinglanguage.
Soinrealtime, itcanviewtheinformationthatyou'reputtinginto a formanditcantellwhattypeofdatatypeitISS.
So, basically, ifyouhave a littlebox, andthatboxsaysageandyoutrytotypeBobthenJavascript, dependingonhowyoucodeditcanmakethatlittleboxturnredorcandootherthingsto, say, yourputyourtryingtoputthewrongtypeofdataintothisparticularfieldagain.
Ifyouhave a firstnameandyouputin 12 youcanhave a littleredboxshowupusingJavascripttosayyou'retryingtoputthewrongtypeofdatainthisfield.
Whenyouhitthesubmitbutton, a validationprocessgoesthrough, looksatallthedifferentfieldsverifiesthatallthedifferentfieldsarethetypeofdatathatthey'resupposedtobe.
Sowhenthefirstthingsyouneedtobethinkingaboutifyou'regonnabedesigningthatfrontendisbasicallythatformvalidationsothatpeoplebasicallythat's a wholethingwithdatatypesandallthiskindofthing.
Andsoyouwantsomekindofacknowledgementfromthedatabaseserverfromfromtheinfrastructurethatyou'vecreatedbecauseofoneoftheworstthingsthatyoucanhaveintherealworldisbasicallywhat's called a silent, a silentfail.
Sowhat a silentfailisiswhereyousubmitinformationtothedatabase, andthen, forwhateverreason, itdoesn't gointothedatabase.
Thisisonethatreasonswhyit's veryimportanttoreallythinkabouthowyourdesigninyourdatabase, becausewhenyoubuildthedatabase, theideais, iswhenyoubuilditonce, asBill, youreallyshouldn't bemessingaround a lotwith a schemaandwhattypeofdatathatthatdatabaseisabletotakein.
Becauseanytimeyoutrytomodifythedatabase, youmay.
Youmaycreateproblemsthatyou'renotexpecting.
Soit's veryimportanttoreallysitdownatthedesignphaseandreallybethinkingaboutOkay, whatdataisitthat I reallyneed, likereallythinkaboutthattooagain, whenyou'rethinkingabout a numberyouknowisthat a numberisatanend?
Isitjustthewholenumber 10 102 100?
Isitisit a numberofthedecimalpoint, soshouldbeafloat?
Andallof a suddenagain, ifyou'redoingsomekindofautotallythingorsomethingelse, youknow, whenyouflipoverfrombeing a fivedigitnumbertwobeing a sixdigitnumberallof a suddenyoumaycrasherdatabase.