1、Database Design.School of softwareChapter 2 Database System Development Lifecycle何婧Part I Database System Design2Database Design.School of softwareObjectivesdatabase system development lifecycle2Software Crisis13Database Design.School of software2.1 Software Crisis(软件危机软件危机)nSoftware crisis was a te
2、rm used in the early days of computing science for the difficulty of writing useful and efficient computer programs in the required time.The major cause of the software crisis is that the machines have become several orders of magnitude more powerful!To put it quite bluntly:as long as there were no
3、machines,programming was no problem at all;when we had a few weak computers,programming became a mild problem,and now we have gigantic computers,programming has become an equally gigantic problem.Edsger Dijkstra,The Humble Programmer(EWD340),Communications of the ACM,1972(1930-2002)4Database Design.
4、School of software2.1 Software Crisis(软件危机软件危机)nIBM OS/3601961-1964More than 2000 engineers5000 person-yearsMore than$500 millionFrederick Brooks(1931-)A.M.Turing Award,Association for Computing Machinery(1999)The Mythical Man-Month:Essays on Software Engineering(人月神话:软件项目管理之道)5Database Design.Schoo
5、l of software2.2 Stages of database system development lifecycle1.Database planning2.System definition3.Requirements collection and analysis4.Database design5.DBMS selection(optional)6Database Design.School of software2.3 Stages of database system development lifecycle6.Application design7.Prototypi
6、ng(optional)8.Implementation9.Data conversion and loading10.Testing11.Operational maintenance.7Database Design.School of softwareStages of the database system development lifecycle8Database Design.School of software数据库应用开发周期各个阶段采集的数据和产生的文档示例开发阶段开发阶段捕获的数据示例捕获的数据示例产生的文档示例产生的文档示例1 数据库规划数据库规划数据库工程的目标和目的
7、数据库工程的目标和目的任务描述和数据库系统任务描述和数据库系统目的目的2 系统定义系统定义主要用户视图描述(包括工主要用户视图描述(包括工作角色作角色/或者业务应用领域)或者业务应用领域)数据库系统的边界和范数据库系统的边界和范围定义,用户视图定义围定义,用户视图定义3 需求收集和分析需求收集和分析用户视图的要求,系统说明,用户视图的要求,系统说明,包括性能和安全性要求包括性能和安全性要求用户和系统的需求说明用户和系统的需求说明书书4 数据库设计数据库设计用户对逻辑数据库设计的反用户对逻辑数据库设计的反馈和对馈和对DBMS的要求的要求逻辑数据库设计(包括逻辑数据库设计(包括ER模型、数据字典、
8、模型、数据字典、表),物理数据库设计表),物理数据库设计5 应用程序设计应用程序设计用户对界面设计的反馈用户对界面设计的反馈应用程序设计应用程序设计9Database Design.School of software数据库应用开发周期各个阶段采集的数据和产生的文档示例开发阶段开发阶段捕获的数据示例捕获的数据示例产生的文档示例产生的文档示例6 DBMS的选择的选择目标目标DBMS提供的功能提供的功能DBMS评估和推荐评估和推荐7 构建原型构建原型用户对原型的反映用户对原型的反映修改了的用户需求和系修改了的用户需求和系统说明书统说明书8 实现实现目标目标DBMS提供的功能提供的功能9 数据转换和
9、加载数据转换和加载当前的数据格式,目标当前的数据格式,目标DBMS的数据导入能力的数据导入能力10 测试测试测试结果测试结果测试方法、测试结果的测试方法、测试结果的分析分析11 操作维护操作维护性能测试结果,新的系统需性能测试结果,新的系统需求求用户手册、性能结果分用户手册、性能结果分析、修改的用户需求与析、修改的用户需求与系统说明书系统说明书10Database Design.School of software1.Database planningnManagement activities that allow stages of database system development
10、lifecycle to be realized as efficiently and effectively as possible.nShould be integrated with overall IS strategy of the organization.11Database Design.School of software1.Database planningnMission statement(任务陈述任务陈述)for the database project defines major aims of database system.nMission statement
11、helps clarify purpose of the database project and provides clearer path towards the efficient and effective creation of required database system.12Database Design.School of software1.Database planningnOnce mission statement is defined,mission objectives(任务目标)(任务目标)are defined.nEach objective should
12、identify a particular task that the database must support.nShould also include additional information that specifies the work to be done,the resources with which to do it,and the money to pay for it all.13Database Design.School of software1.Database planningnDatabase planning may also include develo
13、pment of standards that govern:how data will be collected,how the format should be specified,what necessary documentation will be needed,how design and implementation should proceed.Case14Database Design.School of software2.System definitionnDescribes scope and boundaries of database system,includin
14、g its major user views.nDescribes how database system will interface with other parts of the organizations information system.15Database Design.School of software2.System definitionBoundary for database system of StayHome16Database Design.School of software2.System definitionBoundary for database sy
15、stem of StayHome17Database Design.School of software2.System definitionnUser view defines what is required of a database system from the perspective of:a particular job(such as Manager or Supervisor)or business application area(such as marketing,personnel,or stock control).nDatabase system may have
16、one or more user views.18Database Design.School of software2.System definitionDatabase system with multiple user views19Database Design.School of software2.System definition20Database Design.School of software3.Requirements collection and analysisnProcess of collecting and analyzing information abou
17、t the organization to be supported by the database system,and using this information to identify the requirements for the new system.21Database Design.School of software3.Requirements collection and analysis22Database Design.School of software3.Requirements collection and analysis231centralized appr
18、oachview integration approach;combination of both approaches.vThree main approaches:23Database Design.School of software3.Requirements collection and analysisnCentralized approach Requirements for each user view are merged into a single set of requirements for the new database system.A data model re
19、presenting all user views is created during the database design stage.24Database Design.School of software3.Requirements collection and analysisCentralized approach to managing multiple user views25Database Design.School of software3.Requirements collection and analysisnView integration approachRequ
20、irements for each user view remain as separate lists.Data models representing each user view are created and then merged during the database design stage.26Database Design.School of software3.Requirements collection and analysisView integration approach to managing multiple user views27Database Desi
21、gn.School of softwareStayHome user views and data28Database Design.School of software*4.Database designnProcess of creating a design that will support the organizations mission statement and objectives for the required database system.nTwo main phases of database design:Logical database designPhysic
22、al database design.29Database Design.School of software*4.3.4 Database designnLogical database design identifies the important objects that need to be represented in the database and the relationships between these objects.nPhysical database design describes how the logical design is to be physicall
23、y implemented(as tables)in the target DBMS.30Database Design.School of software5.DBMS selection(Optional)nSelection of an appropriate DBMS to support the database system.nUndertaken at any time prior to logical design provided sufficient information is available regarding system requirements.31Datab
24、ase Design.School of software5.DBMS selection(Optional)DB-Engines 2015 年年2月月 数据库排名数据库排名32Database Design.School of software6.Application designnDesign of user interface and application programs that use and process the database.nDatabase and application design are parallel activities.33Database Desi
25、gn.School of software6.Application designnTransaction is an action,or series of actions,carried out by a single user or application program that accesses or changes content of the database.34Database Design.School of software6.Application designnThree main types of transactions:retrieval transaction
26、supdate transactionsmixed transactions35Database Design.School of software6.Application designGuidelines for form/report design36Database Design.School of software7.Prototyping(Optional)nBuilding working model of a database system.nPurposeto identify features of a system that work well,or are inadeq
27、uate;to suggest improvements or even new features;to clarify the users requirements;to evaluate feasibility of a particular system design.37Database Design.School of software7.Prototyping(Optional)Requirements prototyping determines the requirements of a proposed database system and then the prototy
28、pe is discardedprototyping strategiesEvolutionary prototyping is used for the same purposes,but the prototype is not discarded and with further development becomes the working database system38Database Design.School of software8.ImplementationnPhysical realization of the database and application des
29、igns.Use DDL to create database schemas and empty database files.Use DDL to create user views.Use 3GL or 4GL to create the application programs,which includes database transactions.Use DDL to implement security and integrity controls.However,some may be defined using DBMS utilities or operating syst
30、em.39Database Design.School of software9.Data conversion and loadingnTransferring any existing data into new database and converting any existing applications to run on new database.only required when a new database system is replacing an old mon for a DBMS to have a utility that loads existing file
31、s into the new database.May be possible to convert and use application programs from the old system for use by the new system.40Database Design.School of software10.TestingnProcess of running the database system with the intent of finding errors.Use carefully planned test strategies and realistic da
32、ta.Testing cannot show absence of faults;it can show only that software faults are present.Demonstrates that database and application programs appear to be working according to requirements.41Database Design.School of software11.Operational maintenancenProcess of monitoring and maintaining the datab
33、ase system following installation and involves:monitoring performance of system.If performance falls,may require tuning or reorganization of the database.maintaining and upgrading database system(when required).incorporating new requirements into database system.42Database Design.School of softwareusers requirements specificationn数据需求数据需求n事务需求事务需求n数据库系统的系统说明数据库系统的系统说明初始数据库大小初始数据库大小数据库增长速度数据库增长速度记录查找的类型和平均数量记录查找的类型和平均数量网络和数据共享需求网络和数据共享需求性能性能安全性安全性备份和恢复备份和恢复用户界面用户界面合法问题合法问题Database Design.School of