




已阅读5页,还剩30页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
AFirstCourseinDatabaseSystems Departmentofcomputerscience technologyNJUST AFirstCourseinDatabaseSystems 2 5学分上课 0 5学分上机 共3学分 学习目的 掌握数据库系统的基本概念 原理和方法 学会如何有效地使用数据库管理系统 包括数据库的设计和对数据库的编程 学习方法 理论结合实践 考核方式及要求 作业 20 按时认真完成作业 实验 10 完成上机实验并提交实验报告 闭卷考试 70 英文试卷 AFirstCourseinDatabaseSystems ReferencebooksJeffreyD Ullman JenniferWidom 数据库系统基础教程 岳丽华等译 机械工业出版社 2003 AbrahamSilberschatz HenryF Korth S Sudarshan 数据库系统概念 杨冬青等译 机械工业出版社 2003 黄明等编著 Delphi7信息系统设计与开发实例 机械工业出版社 2004 http www db stanford edu ullman fcdb html TheWorldsofDatabaseSystemTheEntity RelationshipDataModelTheRelationalDataModelOtherDataModelsRelationaiAlgebraTheDatabaseLanguageSQLConstraintsandTriggersSystemAspectsofSQL AFirstCourseinDatabaseSystems 1TheWorldsofDatabaseSystems TheEvolutionofDatabaseSystemsOverviewofaDBMSOutlineofDatabase SystemsStudies 1 1TheEvolutionofDatabaseSystems What sadatabase Inessence adatabaseisacollectionofinformationthatexistsoveralongperiodoftime oftenmanyyears Incommon adatabaseisacollectionofdatathatismanagedbyadatabasemanagementsystem DBMS 1 1TheEvolutionofDatabaseSystems DatabaseApplications Banking alltransactionsAirlines reservations schedulesUniversities registration gradesSales customers products purchasesManufacturing production inventory orders supplychainHumanresources employeerecords salaries taxdeductionsDatabasestouchallaspectsofourlives 1 1TheEvolutionofDatabaseSystems ADBMSisexpectedto DataDefinitionLanguage DDL createdatabasesandspecifytheirschema 模式 AschemaisagroupofcollectionsofsentencesthatareexpressedbyDDLtodescribethelogicalstructureofsomedatabasecompletely DataQueryLanguageandDataManipulationLanguage query 查询 andmodify 更新 thedatabasedontheschemaofthedatabase Supportthestorageofverylargeamountsofdata gigabytesormore overalongperiodoftime SupportDatasharing 共享 controlaccesstodatafrommanyusersatonce withoutallowingtheactionofoneusertoaffectotherusers withoutallowingsimultaneousaccessestocorruptthedataaccidentally 1 1TheEvolutionofDatabaseSystems Databasesystemsevolvedfromfilesystems DataredundancyandinconsistencyMultiplefileformats duplicationofinformationindifferentfiles DifficultyinaccessingdataNeedtowriteanewprogramtocarryouteachnewtask Dataisolation multiplefilesandformats IntegrityproblemsIntegrityconstraints e g accountbalance 0 become buried inprogramcoderatherthanbeingstatedexplicitly Hardtoaddnewconstraintsorchangeexistingones 1 1TheEvolutionofDatabaseSystems AtomicityofupdatesFailuresmayleavedatabaseinaninconsistentstatewithpartialupdatescarriedout Example Transferoffundsfromoneaccounttoanothershouldeithercompleteornothappenatall ConcurrentaccessbymultipleusersConcurrentaccessedneededforperformance Uncontrolledconcurrentaccessescanleadtoinconsistencies Example Twopeoplereadingabalanceandupdatingitatthesametime SecurityproblemsHardtoprovideuseraccesstosome butnotall data 1 1TheEvolutionofDatabaseSystems Late1960sand1970s HarddisksallowdirectaccesstodataNetworkandhierarchicaldatamodelsinwidespreaduseTheearlyDBMSdidn tsupporthigh levelquerylanguages 1 1TheEvolutionofDatabaseSystems 1970 TedCodddefinestherelationaldatamodelWouldwintheACMTuringAwardforthisworkIBMResearchbeginsSystemRprototypeMainidea organizeallthedataindatabaseastablescalledrelations Queriescouldbeexpressedinaveryhigh levellanguagetoincreasetheefficiencyofdatabaseprogrammers 1 1TheEvolutionofDatabaseSystems 1980s ResearchrelationalprototypesevolveintocommercialsystemsSQLbecomesindustrialstandardParallelanddistributeddatabasesystemsObject orienteddatabasesystems 1990s Largedecisionsupportanddata mining 数据挖掘 applicationsLargemulti terabytedatawarehousesEmergenceofWebcommerce 2000s XMLandXQuerystandardsAutomateddatabaseadministration 1 2OverviewofaDatabaseManagementSystem ADBMSisapowerfultoolforcreatingandmanaginglargeamountsofdataefficientlyandallowingittopersistoverlongperiodsoftime safely 1 2OverviewofaDatabaseManagementSystem 1 2OverviewofaDatabaseManagementSystem Application1 Application2 Applicationn DBMS database DatabaseManagementSystem 1 2OverviewofaDatabaseManagementSystem Storagemanager Buffermanager read writepages buffers index file recordmanger pagecommands data metadata indexs Executionengine index file andrecordrequests Querycompiler Queryplan Queries updates User application Transactionmanager DDLcompiler DDLcommands Databaseadministrator Transactioncommands Loggingandrecovery Concurrencycontrol Locktable logpages metadata Metadata statistics 单线框系统成分双线框内存中的数据结构实线控制和数据流虚线数据流 1 2OverviewofaDatabaseManagementSystem Twotypesofuser ConventionalusersandapplicationprogramsAdatabaseadministrator DBA ThreetypesofinputstotheDBMS Queries questionsaboutthedatatwoways SQL APIModifications operationstomodifythedataSchemamodifications commandstochangetheschemaofthedatabaseorcreateanewdatabasebydatabaseadministrators DDLcommands 1 2OverviewofaDatabaseManagementSystem Queryprocessor QuerycompilerTranslatesthequeryintoaninternalformcalledaqueryplan Aqueryparser 分析器 AquerypreprocessorAqueryoptimizer 优化器 ExecutionengineItgetsthedatafromthedatabaseintobuffersinordertomanipulatethatdata Itneedstointeractwiththeschedulertoavoidaccessingdatathatislocked andwiththelogmanagertomakesurethatalldatabasechangesareproperlylogged 1 2OverviewofaDatabaseManagementSystem Storage Aplacewheredataisstored containsdataandmetadataData thecontentsofthedatabaseitself Metadata 元数据 thedatabaseschemathatdescribesthestructureof andconstraintson thedatabase Indexes datastructuresthatsupportefficientaccesstothedata Indexesarepartofthestoreddata andadescriptionofwhichattributeshaveindexesispartofthemetadata 1 2OverviewofaDatabaseManagementSystem Storagemanagerandbuffermanager managesthereadingandwritingofinformationincludesthestoragemanagerandthebuffermanager storagemanager keepstrackofthelocationoffilesonthediskandobtainstheblockorblockscontainingafileonrequestfromthebuffermanager block 4K 16Kbuffermanager partitiontheavailablemainmemoryintobuffers page 1K 4K 1 2OverviewofaDatabaseManagementSystem Transaction agroupofoperationsthatmustappeartohavebeenexecutedtogethersequentially asaunit Properties ACIDAtomicity eitherallofatransactionbeexecutedornoneofitis Consistency keepconsistentstate Isolation Whentwoormoretransactionsrunconcurrently theireffectsmustbeisolatedfromoneanother Durability 持久性 Ifatransactionhascompleteditswork itseffectshouldnotgetlostwhilethesystemfail evenifitfailsimmediatelyafterthetransactioncompletes 1 2OverviewofaDatabaseManagementSystem Transactionmanager beresponsiblefortheintegrityofthesystemLoggingConcurrencycontrol lockDeadlockresolution 1 2OverviewofaDatabaseManagementSystem Client Server C S architecture DBClient DBClient DBServer JavaC C PowerBuilderDelphiVB MSAccessSybaseASAMySQLOracleIBMDB2 sqlrequest sqlrequest reply reply Client theprocesssendingqueriesorothercommands Server theprocessexecutingqueriesorothercommands 1 3OutlineofDatabase SystemsStudies Ideasrelatedtodatabasesystemcanbedividedintothreebroadcategories Design Howtobuildausefuldatabase Requirementanalysis datamodeling relationalmodeling Programming Howtoexpressqueriesandotheroperationsondatabase Iimplementation HowtobuildaDBMS 1 3 1DatabaseDesign Chapter2and3coverdesign Chapter2 TheEntity RelationshipDataModelChapter3 TheRelationalDataModel 1 3 3Example We llbuildamarketingdatabasesystemforasalecompany supermarket Itwillmanageallthefollowinginformation 1 Managealldepartments informationinthecompany suchas Shanghaisaledepartment JiangSusaledepartment Alsomanageeverysalesmaninformationinthosedepartmentsincludingexclusiveemployeenumber IDcardnumber andsomeprivateinformation suchasname gender birthdayandphonenumber Bythewayoneofsalesmenwillactasthedepartmentmanagerinhisdepartment 1 3 3Example 2 Manageagroupofcustomers name province city companyname phonenumber 3 Managealltheproducts information manufacturers e g Chunlan Hailer types e g motorcycle airconditioner specifications e g MT125 RE1500 prices descriptions 4 Managesalesorderwhichrecordeachdealhasbeendone Notes everysalesordercontainsanuniqueorderNo signdate acorrespondingcustomer asalesman andatleastonekindofproducts Anyproductintheordershouldhaveitsquantityandunitpricewhichwillbeusedtocalculatethetotalprices RelationalDataModel Customer custid name prov city phone unit Product prodid factory type spec price desc Salesman empid idno name gender phone deptid Department depti
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 大唐电力大兴安岭地区2025秋招半结构化面试模拟30问及答案
- 达州市中石化2025秋招笔试模拟题含答案炼油工艺技术岗
- 中国移动宜春市2025秋招企业文化50题速记
- 外墙真石漆施工方案
- 大庆市中石油2025秋招面试半结构化模拟题及答案炼油设备技术岗
- 攀枝花市中石化2025秋招面试半结构化模拟题及答案炼化装置操作岗
- 五级祈祷测试题及答案
- 2025湖南永州市东安县招聘第一批就业见习岗位121人考前自测高频考点模拟试题及答案详解(名师系列)
- 2025年武汉工程大学人才引进33人考前自测高频考点模拟试题及答案详解(考点梳理)
- 2025河北省人民医院招聘考前自测高频考点模拟试题及参考答案详解一套
- 2025年医保知识考试题库及答案:基础政策解读与医保报销比例调整试题
- 《中医基础理论之阴阳五行:中医学专业教案》
- 中级货币鉴定师资格考试题(附答案)
- DB32T 5018-2025专业戒毒大队建设与工作规范
- 基于用户行为的精准推送策略
- 2025年时事政治考试116题及参考答案
- 2025年全国职业院校技能大赛导游业务知识竞赛题库及答案(共60题)
- 老人骨折术前护理
- 压裂返排液的深度处理及再利用技术研究进展
- 《流行音乐发展史》课件
- GB 17761-2024电动自行车安全技术规范
评论
0/150
提交评论