英语翻译TheLogicalLayerThelogicallayerorlogicalmodelcomprisesthefirstoftwolayersofczbstrczctioninthedatabase:thephysicallayerhasaconcreteexistenceintheoperatingsystemfiles,whereasthelogicallayerexistsonlyasabst
英语翻译
TheLogicalLayer
Thelogicallayerorlogicalmodelcomprisesthefirstoftwolayersofczbstrczctioninthedatabase:thephysicallayerhasaconcreteexistenceintheoperatingsystemfiles,whereasthelogicallayerexistsonlyasabstractdatastructuresassembledfromthephysicallayerasneeded.TheDBMStransformsthedatainthedatafilesintoacommonstructure.Thislayerissometimescalledtheschema,atermusedforthecollectionofallthedataitemsstoredinaparticulardatabaseorbelongingtoaparticulardatabaseuser.DependingontheparticularDBMS,thislayercancontainasetoftwo-dimensionaltables,ahierarchicalstructuresimilartoacompany'sorganizationchart,orsomeotherstructure.The"PrevalentDatabaseModels"sectionlaterinthischapterdescribesthepossiblestructuresinmoredetail.
TheExternalLayer
Theexternallayerorexternalmodelisthesecondlayerofabstractioninthedatabase.Thislayeriscomposedoftheuserviewsdiscussedearlier,whicharecollectivelycalledthesubschema.Inthislayer,thedatabaseusers(applicationprogramsaswellasindividuals)thataccessthedatabaseconnectandissuequeriesagainstthedatabase.Ideally,onlytheDBAdealswiththephysicalandlogicallayers.TheDBMShandlesthetransformationofselecteditemsfromoneormoredatastructuresinthelogicallayertoformeachuserview.Theuserviewsinthislayercanbepredefinedandstoredinthedatabaseforreuse,ortheycanbetemporaryitemsthatarebuiltbytheDBMStoholdtheresultsofasingleadhocdatabasequeryuntiltheyarenolongerneededbythedatabaseuser.Anczdhocqueryisaquerythatisnotpreconceivedandthatisnotlikelytobereused.ViewsarediscussedinmoredetailinChapter2