Modello di dati

Modus

Definition:Alsocalledlogicalmode,itisthedescriptionofthelogicalstructureandcharacteristicsofalldatainthedatabase,andisthecommondataviewforallusers.

Intellectus:

Adatabasehasonlyonemode;

②Itistheviewofdatabasedataatthelogicallevel;

③ DatabaseThemodeisbasedonacertaindatamodel;

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

ExternalSchema

Definition:alsoknownasSubschemaorusermode,whichcanbeseenandusedbydatabaseusers(includingapplicationprogrammersandendusers)Thedescriptionofthelogicalstructureandcharacteristicsofthelocaldataisthedataviewofthedatabaseuserandthelogicalrepresentationofthedatarelatedtoacertainapplication.

Intellectus:

① Adatabase possunt habere multiplices externalmodes;

② Externus modus est.

③Externalmode Itisa praepotens mensura est, ut in tuto ponatur.

InternalSchema

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

Intellectus:

① Adatabasehasonlyoneinternalschema;

②Atablemayconsistofmultiplefiles,suchasdatafilesandindexfiles.

Itisamethodforthedatabasemanagementsystem(DBMS)toeffectivelyorganizeandmanagethedatainthedatabase

Itspurposeis:

①Inordertoreducedataredundancy,Realizedatasharing;

②Inordinata operandi.

SchemaInterpretation(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.

Mappingfromconceptualmodetointernalmode

Thismappinggivesthecorrespondencebetweenthegloballogicalstructureofthedataintheconceptualmodeandthephysicalstoragestructureofthedata.ThismappingisgenerallydefinedbyDBMSimplementation.

Mappingfromexternalmodetoconceptualmode

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

Related Articles
TOP