Chapter 1 Introduction 2016/7/13 Data Modeling 1 Objectives The basic concepts of database management The role of data modeling and database design in the database life cycle 2016/7/13 Data Modeling 2 1.1 Data and Database Management File system Data item -> Record -> File Relational database Attribute -> Tuple -> Table Database 2016/7/13 It is a collection of interrelated stored data that serves the needs of multiple users within one or more organizations, that is, interrelated collections of many different types of tables. Data Modeling 3 1.1 Data and Database Management DBMS is a generalized software system for manipulating databases, and supports: 2016/7/13 Ligical view (schema, subschema) Physical view (access methods) DDL DML Utilities (transaction management, concurrency control, data integrity, crash recovery, security) Data Modeling 4 1.1 Data and Database Management Data independence 2016/7/13 is the ability to make changes in either the logical or physical structure of the database without requiring reprogramming of application programs. 邏輯資料獨立:當Conceptual view改變時,External view不需改變。 實體資料獨立:當Internal view改變時,Conceptual view不需改變。 Data Modeling 5 1.2 Data Modeling and the EntityRelationship Approach Schema diagram (by Charles Bachman in the 1960s) ER (by Peter Chen in 1976) Simplicity Readability The goal of conceptual schema design The ER model has two levels of definition: 2016/7/13 Simple level (Figure 1.1) Complex level Data Modeling 6 1.3 The Database Life Cycle The steps of database life cycle (Figure 1.2~1.4) Requirement analysis by interviewing both producers and users. The specification includes the data, the natural data relationship, and the software platform. Logical design: global schema a. b. c. d. 2016/7/13 ER modeling View integration Transformation of the ER model to SQL tables Normalization of tables Data Modeling 7 1.3 The Database Life Cycle The steps of database life cycle (Figure 1.2~1.4) Physical design The selection of indexes (access methods) Clustering of data Data integrity Denormalization: be refined in limited ways to reflect query performance Data distribution Database implementation, monitoring, and modification 2016/7/13 Data Modeling 8