Slide Xây dựng ứng dụng hệ thống thông tin - Chapter 13

LI
lienhejb
ダウンロード数: 0
56
0

資料の内容

1 ページ

13 Chapter 13: Designing Databases Systems Analysis and Design in a Changing World, 3rd Edition www.goupee.com

2 ページ

13 Learning Objectives Describe the differences and similarities between relational and object-oriented database management systems Design a relational database schema based on an entity-relationship diagram Design an object database schema based on a class diagram Systems Analysis and Design in a Changing World, 3rd Edition 2

3 ページ

13 Learning Objectives (continued) Design a relational schema to implement a hybrid object-relational database Describe the different architectural models for distributed databases Systems Analysis and Design in a Changing World, 3rd Edition 3

4 ページ

13 Overview This chapter describes design of relational and OO data models Developers transform conceptual data models into detailed database models Entity-relationship diagrams (ERDs) for traditional analysis Class diagrams for object-oriented (OO) analysis Detailed database models are implemented with database management system (DBMS) Systems Analysis and Design in a Changing World, 3rd Edition 4

5 ページ

13 Databases and Database Management Systems Databases (DB) – integrated collections of stored data that are centrally managed and controlled Database management system (DBMS) – system software that manages and controls access to database Databases described by a schema: description of structure, content, and access controls Systems Analysis and Design in a Changing World, 3rd Edition 5

7 ページ

13 DBMS Important Capabilities Simultaneous access by multiple users and applications Access to data without application programs (via a query language) Managing organizational data with uniform access and content controls Systems Analysis and Design in a Changing World, 3rd Edition 7

8 ページ

13 Database Models Impacted by technology changes since 1960s Model Types Hierarchical Network Relational Object-oriented Most current systems use relational or object- oriented data models Systems Analysis and Design in a Changing World, 3rd Edition 8

9 ページ

13 Relational Databases Relational database management system (RDBMS) organizes data into tables or relations Tables are two dimensional data structures Tuples: rows or records Fields: columns or attributes Tables have primary key field(s) which can be used to identify unique records Keys relate tables to each other Systems Analysis and Design in a Changing World, 3rd Edition 9

10 ページ

13 Partial Display of Relational Database Table Systems Analysis and Design in a Changing World, 3rd Edition 10

11 ページ

13 Designing Relational Databases Create table for each entity type Choose or invent primary key for each table Add foreign keys to represent one-to-many relationships Create new tables to represent many-to-many relationships Systems Analysis and Design in a Changing World, 3rd Edition 11

12 ページ

13 Designing Relational Databases (continued) Define referential integrity constraints Evaluate schema quality and make necessary improvements Choose appropriate data types and value restrictions (if necessary) for each field Systems Analysis and Design in a Changing World, 3rd Edition 12

13 ページ

13 Relationship Between Data in Two Tables Systems Analysis and Design in a Changing World, 3rd Edition 13

15 ページ

13 Representing Relationships Relational databases use foreign keys to represent relationships One-to-many relationship Add primary key field of ‘one’ entity type as foreign key in table that represents ‘many’ entity type Many-to-many relationship Use the primary key field(s) of both entity types Use (or create) an associate entity table to represent relationship Systems Analysis and Design in a Changing World, 3rd Edition 15

17 ページ

13 Represent One-to-Many Relationships Systems Analysis and Design in a Changing World, 3rd Edition 17

18 ページ

13 Enforcing Referential Integrity Consistent relational database state Every foreign key also exists as a primary key value DBMS enforces referential integrity automatically once schema designer identifies primary and foreign keys Systems Analysis and Design in a Changing World, 3rd Edition 18

19 ページ

13 DBMS Referential Integrity Enforcement When rows containing foreign keys are created: DBMS ensures that value also exists as a primary key in a related table When row is deleted: DBMS ensures no foreign key in related tables have same value as primary key of deleted row When primary key value is changed: DBMS ensures no foreign key values in related tables contain the same value Systems Analysis and Design in a Changing World, 3rd Edition 19

20 ページ

13 Evaluating Schema Quality High quality data model has: Uniqueness of table rows and primary keys Ease of implementing future data model changes (flexibility and maintainability) Lack of redundant data (database normalization) Database design is not objective or quantitatively measured; it is experience and judgment based Systems Analysis and Design in a Changing World, 3rd Edition 20

最初の20ページを表示しています。全文を見るには資料をダウンロードしてください。

コメント (0)

ログイン して議論に参加する

まだコメントはありません。最初のコメントを書きましょう!