comp283-lecture 1 applied database managementcgi.csc.liv.ac.uk/~phil/teaching/comp283/lecture...
TRANSCRIPT
COMP283-Lecture1
AppliedDatabaseManagement
1
Introduction
MyContactDetails: Room: Tel: e-mail:
PhilJimmieson
Ashton1.20(+44/0)[email protected]
Comp283: AppliedDatabaseManagement7.5credits.
Lectures: 10of45minutes.
Practicals: 10of2hours.
COMP283-Lecture1
Introduction:PleaseNote
● Thisisapracticalmodule–youshouldmakesureyouattendalllectures,practicalsessionsandcompletealltheassignments
● Arriveatlecturesontimeplease!● Doaskquestions
2
COMP283-Lecture1
Introduction:LearningOutcomes
● FormalLearningOutcomes:● Attheendofthemodulethestudentshouldbeableto:
● designandstructureanefficientscalabledatabasesystem,● implementandconfigureadatabasesystem,● maintainasecureanddurabledatabase,● describe,illustrateandexplaintheconceptoflinkeddatabasesanddatamigrationtechniques.
● InformalLearningOutcomes:● Thestudentshouldknowhowtoproducetimelyandprofessionalbusiness
plans,procedures,andreports.● Timemanagementskillswillberequiredfortimelysubmissionofassignments
3
COMP283-Lecture1
Introduction:DBandDBMS
●Whatisadatabase?●WhatisaDataBaseManagementSystem(DBMS)?● Asoftwareapplicationthathelpsdefine,store,retrieveandmaintaindataoncomputersystems.
● Isthatallthereistoadatabase?
4
COMP283-Lecture1
Introduction:DataModels
● DatabasesandDBMSeachfollowadatamodel:● Flat● Hierarchical● Dimensional● Network● Relational● Entity-relationship● Graph● Object-oriented● Entity-attribute-valuemodel
5
Usuallyasinglefile.Onerecordperlinewithafielddelimiter,e.g.csvfileorfixedlength(padded)fields.
COMP283-Lecture1
Introduction:DataModels
● DatabasesandDBMSeachfollowadatamodel:● Flat● Hierarchical● Dimensional● Network● Relational● Entity-relationship● Graph● Object-oriented● Entity-attribute-valuemodel
6
Dataorganisedintoatree-likestructure,singleparent–multiplechildmodel.e.g.folderandfilestructureonacomputer.
COMP283-Lecture1
Introduction:DataModels
● DatabasesandDBMSeachfollowadatamodel:● Flat● Hierarchical● Dimensional● Network● Relational● Entity-relationship● Graph● Object-oriented● Entity-attribute-valuemodel
7
SpecialisedRelationalmodeltailoredtodatawarehousingusingOnlineAnalyticalProcessing(OLAP)queries.Dataisorganisedintonumericalfacts(measures)andcategorised(dimensions).Quickandefficientforsummingdataordrillingdowntospecifics,e.g.asalesinvoicecouldbeusedtoindicatethetotalpurchaseprice,butyoucouldthenquerytheitemsbought,wheretheitemwasstored,whereitwasmanufactured…
COMP283-Lecture1
Introduction:DataModels
● DatabasesandDBMSeachfollowadatamodel:● Flat● Hierarchical● Dimensional● Network● Relational● Entity-relationship● Graph● Object-oriented● Entity-attribute-valuemodel
8
Dataisorganisedintosetswithaname,anownerandoptionallyareferencetoanotherrelatedset.Thereferenceisalinktotheownedsetofdata.e.gtheWorldWideWebisanetworkeddatabase.AwebpageisdefinedbyitsURL,itcontainsinformationandmayhavelinkstootherwebpages.
COMP283-Lecture1
Introduction:DataModels
● DatabasesandDBMSeachfollowadatamodel:● Flat● Hierarchical● Dimensional● Network● Relational● Entity-relationship● Graph● Object-oriented● Entity-attribute-valuemodel
9
Consistsofrelations(tables)ofstructureddata,whereeachtuple(record)hasthesameattributesandconformtothesameconstraints.Thedatacanbeseparatedintoseparatetablesandlinkedusingkeysthatuniquelydefinetherecord.Relationshipsbetweentablesareenforcedusingprimaryandforeignkeysthatarepre-definedandensurecorrespondingattributesofinformationmaintaintheirintegrityandconformtotheconstraints.
COMP283-Lecture1
Introduction:DataModels
● DatabasesandDBMSeachfollowadatamodel:● Flat● Hierarchical● Dimensional● Network● Relational● Entity-relationship● Graph● Object-oriented● Entity-attribute-valuemodel
10
Usesentities,relationship,andattributes.Anentitywillhaveoneormoreattributesandwillbedescribedbyitsrelationtoanotherentity.E.gTheentityartistwillhavetheattributes,nameanddateofbirth,theywillhavetherelationshipof“Sang”toanotherentitycalledsongwhichinturnhasanattributeoftitle.Theentity-relationshipisagraphicalwayofdefiningdatasetsandtheirassociations.
COMP283-Lecture1
Introduction:DataModels
● DatabasesandDBMSeachfollowadatamodel:● Flat● Hierarchical● Dimensional● Network● Relational● Entity-relationship● Graph● Object-oriented● Entity-attribute-valuemodel
11
Basedongraphtheory.Nodescontainproperties(informationdescribinganentity-thefacts),edgesdescribethelinkandrelationshiptoothernodes.Alotofthefocusisontheseedgesdescribingtherelationship,ratherthanthepropertiesofthenode.Theedgecanbequeriedtolookatsimilarrelationships–notsoeasyinarelationaldatabase.
COMP283-Lecture1
Introduction:DataModels
● DatabasesandDBMSeachfollowadatamodel:● Flat● Hierarchical● Dimensional● Network● Relational● Entity-relationship● Graph● Object-oriented● Entity-attribute-valuemodel
12
Informationisstoredasobjects,inanObjectOrientateddatabasetheDBMSismorecloselyincorporatedintothedatamodel.EachobjectconsistsofAttributesandMethods.Attributesconsistofinformation,methodsdefinewhatcanbedonewiththedata.Objectorientateddatabasescanbeusedtostoreanddefinecomplexsystems,e.g.Describeaplane,themodularaspectsarewing,fuselage,tail,engine,etc.
COMP283-Lecture1
Introduction:DataModels
● DatabasesandDBMSeachfollowadatamodel:● Flat● Hierarchical● Dimensional● Network● Relational● Entity-relationship● Graph● Object-oriented● Entity-attribute-valuemodel
13
Usedwheretherearepotentiallymanydifferentattributesbutmostofthesearenotrelevant.Thedataforanentityonlyrecordsthepertinentor“not-null”values.e.g.acareersadviceinterviewmayrecordsomestandardattributes:name,dateandtime,butotherattributesmayonlyberecordedforasmallgroupofpeople–hobbiesmightbepaint-ballingandflowerarranging,theirtrainingmightincludetwoyearsinOuter-Mongoliaasayurtbuilder,therelatedskillsanddiscussionwouldberelevanttoveryfewpeople.Awelldefineddatabasewouldbeabletolinktheseactivitieswithasetofrelatedattributes.
COMP283-Lecture1
Introduction:DBSystems
● ThiscoursewillbefocussedonRelationalDatabases,primarilyonMySQL.
●WewillhighlightkeysimilaritiesandoutlinenotabledifferencesbetweenMS-SQL,OracleDBMSandMySQL.
14
COMP283-Lecture1DBHardwareDesign
15
Location: Where will the server be located – under a desk or in an ultra-modern, mains monitored, climate controlled, bomb proof server room.
Storage: How much disk space will be required.
Network: What is the network infrastructure. How much data can be transferred. What restrictions (firewalls) are in place. What network protocols will be required.
Processors: What type of processor will be suitable, 32 or 64 bit, PowerPC, Intel family...How many functional processors will be required?
Cost: What is the budget.What are the hidden costs – will it require additional cooling, electricity, support.What are the direct costs – licences, hardware, commissioning, contractors.
Availability: How responsive does it have to be.Should the database be disseminated to different locations – e.g. branch offices.
Reliability: What level of up-time is required, is 99% good enough or should it be 99.9999%
Security: Physical location.On-line access.Number of admin users.Should some corporate databases reside on the same server or should they always be separated.Confidentiality agreements and privacy policies.Regulations.
COMP283-Lecture1
DBHardwareDesign:Location
● Location● Storage● Network● Processors● Cost● Availability● Reliability● Security
16
● Where?● Facilities● Services(electricity,water,cooling)
COMP283-Lecture1
DBHardwareDesign:Storage
● Location● Storage● Network● Processors● Cost● Availability● Reliability● Security
17
● Assesscurrentstoragecapacity● DiskSpace● Diskthroughput● Locationstoragerequirements
● Calculatefuturestoragerequirements
COMP283-Lecture1
DBHardwareDesign:Network
● Location● Storage● Network● Processors● Cost● Availability● Reliability● Security
18
● Examinethenetworktopology(layout).
● Identifybandwidthrestrictions.● Identifypossibleproblemfirewalls.● Identifythenetworksforclientaccess,serverreplicationanddatabackups.
● Howmanyserverinstancesanddatabasescanbesupported?
● Whatnetworkprotocolsmustbesupported?
COMP283-Lecture1
DBHardwareDesign:Processors
● Location● Storage● Network● Processors● Cost● Availability● Reliability● Security
19
● ADBMSwillbewrittenforaspecificoperatingsystem(OS)
● BoththeDBMSandtheOperatingSystemwillhavesomeminimumandrecommendedsystemrequirements.
● WhenchoosingaDBMSyouwillalsoneedtochoosetheOSandthendeterminewhichtypeofprocessorwillbesuitable.
● Beawarethata“normal”orrecommendedprocessormaynotmeetfuturerequirements–youmayneedtooverspecifytheprocessor.
COMP283-Lecture1
DBHardwareDesign:Costs
● Location● Storage● Network● Processors● Cost● Availability● Reliability● Security
20
● Havetoworktoabudget● Mustbeabletoshowcosteffectiveness● Evaluatealldirectcosts
● Contractorfees● Licencefees● Location/Sitecosts
● Beawareofhiddencosts:● Trainingcosts● Warranty/Maintenancefees● LearningMaterials● Location/Sitecosts● LocationPreparationcosts● Utilitycharges
COMP283-Lecture1
DBHardwareDesign:Availability/Reliability
● Location● Storage● Network● Processors● Cost● Availability● Reliability● Security
21
● Availability=Responsiveness● Reliability=Up-time● Clusteringistheprocessofprovidingsomeredundancyorhighavailability.
● Databasescanbemirrored.● Databasescanbedistributed.
COMP283-Lecture1
DBHardwareDesign:Security
● Location● Storage● Network● Processors● Cost● Availability● Reliability● Security
22
● Whohasphysicalaccesstothesystems?
● Whois/aretheSystemAdministrators?
● WhowillmanagetheDBMA-theDatabaseAdministrators(DBAs)?
● Whoshouldhaveaccesstothedata?
● Whodoeshaveaccesstothedata?● Howsecureisdatacommunication?● Willthedatabeencryptedwhenstored?
COMP283-Lecture1
DBDesign:ResourceConsiderations
● Consolidationistheprocessofcombininghardwareand/orsoftware.
● Adatabaseservercanrunoneormoredatabaseinstances.
● Adatabaseinstancecanrunoneormoredatabaseapplications.
23
COMP283-Lecture1
Conclusion
● Generalintroductiontothiscourse● DefinedtheLearningOutcomes● DefinedwhataDBMSis.● IntroducedgeneralDatabasedesignconsiderations.
24