【正文】
ent A r eco r d o f t he w ag es pai d t o anem pl oy eeT i m eCa r d A r eco r d o f a bl oc k o f t i m e w or k ed by anem pl oy ee at a s t or eStor e O ne o f t he r e t ai l out l et s o f Bi g Hi t Vi deoRental T he r en t al o f a v i deot ape by a cus t om erf or a spe ci f i c pe r i od and c ostPurc hase O r de r A r e q ues t t o pu r chase an i t emVendor A c om pany t hat sell s i t em s t o Bi g Hi tVi deo169。Silberschatz, Korth and Sudarshan Database System Concepts Relationships, Roles, and Structural Constraints ? Roles are attributes that signify the function of a particular entity (type) in a relationship ? Employee manages department ? Department is managed by employee ? Employee worksfor department ? Department has employees who work for it ? Constraints can be ? cardinality ? Each department can have no more than one manager ? participation ? Each department must have a manager 169。Silberschatz, Korth and Sudarshan Database System Concepts Principals of ER Modeling ? Entities and classes ? Entity, a thing in the real world ? Entity Class, the structure of a collection of similar entities ? Attributes ? Attribute, a property of an entity ? Each entity has a value for each of its attributes ? Types of attributes ? simple vs. posite, singlevalued vs. multivalued, stored vs. derived ? domains of attributes 169。Silberschatz, Korth and Sudarshan Database System Concepts Chapter 2, Representing Information with Data Models ? Entity Relationship (ER) Model ? highlevel, conceptual data model ? Specify conceptual schema ? conceptual database design ? Identify the data requirements of users and detailed descriptions of data types, relationships and constraints. ? Concentrate on specifying the properties of the data, not storage. 169。Silberschatz, Korth and Sudarshan Database System Concepts Database Design Process ? Logical Model ? How is each entity and relationship represented in the Data Model of the DBMS ? Hierarchic? ? Network? ? Relational? ? ObjectOriented? 169。Silberschatz, Korth and Sudarshan Database System Concepts Database Design Process ? Requirements Formulation and analysis ? Systems Analysis Process ? Examine all of the information sources used in existing applications ? Identify the characteristics of each data element – numeric – text – date/time – etc. ? Examine the tasks carried out using the information ? Examine results or reports created using the information 169。Silberschatz, Korth and Sudarshan Database System Concepts Stages in Database Design ? Requirements formulation and analysis ? Conceptual Design Conceptual Model ? Implementation Design Logical Model ? Physical Design Physical Model 169。Silberschatz, Korth and Sudarshan Database System Concepts Information Engineering Planning Design Analysis Implementation 169。Silberschatz, Korth and Sudarshan Database System Concepts Database Languages ? DDL, data definition language, conceptual schema ? describe conceptual schemas ? SDL, storage definition language, internal schema ? describe file structures, indexes ? VDL, view definition language, external schema ? DML, data manipulation language ? Highlevel or nonprocedural (. SQL) ? Select Last Name from Roster where Section = 2 ? Lowlevel or procedural ? For r in Roster loop if = 2 then ( )。Silberschatz, Korth and Sudarshan Database System Concepts Levels of database schemas ? Different schemas are presented to different users Ex t e rn a l l e v e li nt er na l t o l og i cal m ap pi ngl og i c al t o ext er na l m ap p i ng sd i s kIn t e r n a l S c h e m a I n t e r n a l l e v e lE x t e r n a l V i e w 1 E x t e r n a l V i e w 2 E x t e r n a l V i e w 3L o g i c a l S c h e m a L o g i ca l l e v e l169。Silberschatz, Korth and Sudarshan Database System Concepts Data Modeling ? A data model is a specification of the information content of a system ? conceptual data model describes information in terms the users will understand ? logical data model describes information in a way that can be used to build a database ? physical data model describes information in terms of its representation in physical storage 169。Silberschatz, Korth and Sudarshan Database System Concepts Time Line for Database Systems ? before 1960 transition from punched card and tape ? 1960s, from file management to databases ? Bachman (GE) IDS and data structure diagrams ? IMS from IBM, Hierarchical Data Model ? IMS DB/DC, Network Model and munication ? SABRE, multiuser access with work ? 1970s, CODASYL and Relational Model ? Codd (IBM) Relational Model ? Chen introduced Entity Relationship Model ? Query languages developed (SQL) ? 1980s, Client/Server DBs, Oracle, DB2 ? PC databases, DBase, Paradox, etc. ? SQL standard for definition and manipulation ? 1990s, webbased information delivery ? Trends: expert DBs, object DBs, distributed DBs 169。Silberschatz, Korth and Sudarshan Database System Concepts Clientserver puting ? Examples from web sites ? New York Times ? Pricewatch ? Industry movement 169。Silberschatz, Korth and Sudarshan Database System Concepts Hierarchical Cost of Storage ? Registers and Cache are fixed size ? Primary storage, memory (RAM) limited by hardware ? 1000 Mbytes per CPU ? Secondary storage, disk, also limited by hardware ? 100 Gbytes per CPU ? Tertiary storage, tape, etc. limited by storage volume 169。Silberschatz, Korth and Sudarshan Database System Concepts Management of Access and Security ? Controlling redundancy ? inconsistency and duplication ? Restricting unauthorized access ? Enforcing integrity constraints ? Providing backup and recovery ? Persistent storage for program objects 169。Silberschatz, Korth and Su