Datový vzor

Režim

Definition:Alsocalledlogicalmode,itisthedescriptionofthelogicalstructureandcharacteristicsofalldatainthedatabase,andisthecommondataviewforallusers.

Porozumění:

①Adatabasehasonlyonemode;

②Jedná se o pohled na data na logické úrovni;

③DatabázeRežim je založen na určitém datovém modelu;

④Whendefiningthemode,itisnotonlynecessarytodefinethelogicalstructureofthedata(suchaswhichdataitemsconstitutethedatarecord,thename,type,valuerangeofthedataitem,etc.),Anddefinethesecurityandintegrityrequirementsrelatedtothedata,anddefinetherelationshipbetweenthesedata.

ExternalSchema

Definition:alsoknownasSubschemaorusermode,whichcanbeseenandusedbydatabaseusers(includingapplicationprogrammersandendusers)Thedescriptionofthelogicalstructureandcharacteristicsofthelocaldataisthedataviewofthedatabaseuserandthelogicalrepresentationofthedatarelatedtoacertainapplication.

Porozumění:

①Databáze může mít několik externích režimů;

②Externí režim je uživatelským náhledem;

③Externí režim je výkonným opatřením pro zajištění bezpečnosti dat.

InternalSchema

Definition:alsoknownasStorageSchema,itisthedescriptionofthephysicalstructureandstorageofdata,andtherepresentationofdatainthedatabase(Forexample,isthestoragemethodofrecordsstoredsequentially,storedinaB-treestructure,orstoredinahashmethod;howtheindexisorganized;whetherthedataiscompressedandstoredandwhetheritisencrypted;whataretherequirementsforthestoragerecordstructureofthedata).

Porozumění:

①Adatabasehasonlyoneinternalschema;

②Atablemayconsistofmultiplefiles,suchasdatafilesandindexfiles.

Itisamethodforthedatabasemanagementsystem(DBMS)toeffectivelyorganizeandmanagethedatainthedatabase

Jeho účel:

①Inordertoreducedataredundancy,Realizedatasharing;

②Za účelem zlepšení účinnosti přístupu a výkonu.

Interpretace schémat (ConceptualSchema)

ConceptualSchemaisthedescriptionoftheglobaldatalogicalstructureinthedatabasesystem,andisthecommondataviewofallusers(applications).ThisdescriptionisanabstractionThedescriptionof,itdoesnotinvolvespecifichardwareenvironmentandplatform,andhasnothingtodowithspecificsoftwareenvironment.

Theconceptualmodelmainlydescribestheconceptualrecordtypeofdataandthedataandtherelationshipbetweenthem.Italsoincludessomesemanticconstraintsbetweenthedata.ItsdescriptioncanbedefinedbytheDDLlanguageintheDBMS.

ExternalSchema

ExternalSchemaisalsocalledSubschemaorUser'sschema.Itistheuser’sdataview,thatis,theuser’sApartoftheseenpatternisderivedfromtheconceptualpattern.Theconceptualpatterngivesaglobaldatadescriptionofthesystemandtheouterpatterngivesalocaldescriptionofeachuser.Aconceptualmodecanhaveseveralexternalmodes,andeachuseronlycaresaboutthemoderelatedtoit.Thiscanshieldalargeamountofirrelevantinformationandisbeneficialtodataprotection,soitisextremelybeneficialtousers.IngeneralDBMS,therearerelatedexternalmodedescriptionlanguages​​(externalmodeDDL).

InternalSchema

InternalSchemaisalsocalledPhysicalSchema,whichgivesDatabasephysicalstoragestructureandphysicalaccessmethods,suchasdatastoragefilestructure,index,clusteringandhashaccessmethodsandaccesspaths.Thephysicalityoftheinternalmodeismainlyreflectedintheoperatingsystemandfilelevel.Deepdowntothedevicelevel(suchasdiskanddiskoperations),butinrecentyearstherehasbeenatrendtowardthedevicelevel(suchasrawdisk,diskblocktechnology,etc.),DBMSgenerallyprovidesrelatedinternalmodedescriptionlanguage(internalmodeDDL).

Thedatamodelgivesthedataframestructureofthedatabase,andthedatainthedatabaseistherealentity,butthesedatamustbeorganizedaccordingtothestructuredescribedbytheframework,andthedatabasecomposedoftheconceptualmodelastheframeworkCalledConceptualDatabase,adatabasecomposedofaframeworkwithanexternalmodeliscalledauserdatabase,andadatabasecomposedofaframeworkwithaninternalmodeliscalledaphysicaldatabase.Amongthethreedatabases,onlythephysicaldatabaseisreal.Existinthecomputer'sexternalmemory,theothertwodatabasesdonotreallyexistinthecomputer,butaremappedfromthephysicaldatabasethroughtwomappings.

Thethreelevelsofthemodelreflectthethreedifferentenvironmentsofthemodelandtheirdifferentrequirements.Theinternalmodelisatthelowestlevel.Itreflectstheactualstorageformofthedatainthephysicalstructureofthecomputer,theconceptualmodelInthemiddlelayer,itreflectsthedesigner'sdatagloballogicrequirements,whiletheoutermodeisintheoutermostlayer,whichreflectstheuser'sdatarequirements.

Thethree-levelmodeofthedatabasesystemisanabstractionofthethreelevelsofdata.Itleavesthespecificphysicalrealizationofthedatatothephysicalmode,sothatusersandglobaldesignersdonotneedtocareaboutthespecificrealizationandphysicalbackgroundofthedatabaseAtthesametime,itestablishestheconnectionandconversionbetweenthethree-levelmodelthroughtwo-levelmapping,sothatalthoughtheconceptualmodelandtheexternalmodeldonothaveaphysicalexistence,theycanalsoobtaintheirexistingentitiesthroughthemapping.Atthesametime,thetwo-levelmappingalsoensuresthedatabaseTheindependenceofthedatainthesystem,thatis,changesinthephysicalorganizationofthedataandchangesinthelogicalconceptlevel,doesnotaffectthechangesintheexternalmodeoftheuser.Itonlyneedstoadjustthemappingmodewithoutchangingtheusermode.

Mapování z koncepčního režimu do vnitřního režimu

Thismappinggivesthecorrespondencebetweenthegloballogicalstructureofthedataintheconceptualmodeandthephysicalstoragestructureofthedata.ThismappingisgenerallydefinedbyDBMSimplementation.

Mapování z externího režimu do koncepčního režimu

Conceptmodeisaglobalmodeandexternalmodeisauser'slocalmode.Aconceptualmodecandefinemultipleexternalmodes,andeachTheexternalmodeisabasicviewoftheconceptualmode.Themappingfromtheexternalmodetotheconceptualmodegivesthecorrespondingrelationshipbetweentheexternalmodeandtheconceptualmode,andthismappingisgenerallyimplementedbyaDBMS.

Související články
HORNÍ