SlideShare a Scribd company logo
1 of 471
Grading System ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object]
Chapter 1: The Database Environment Modern Database Management 8 th  Edition Jeffrey A. Hoffer, Mary B. Prescott,  Fred R. McFadden © 2007 by Prentice Hall
Objectives ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Definitions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Figure 1-1a Data in context Context helps users understand data
Graphical displays turn data into useful information that managers can use for decision making and interpretation Figure 1-1b Summarized data
Descriptions of the properties or characteristics of the data, including data types, field sizes, allowable values, and data context
Disadvantages of File Processing ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Problems with Data Dependency ,[object Object],[object Object],[object Object],[object Object],[object Object]
Figure 1-3 Old file processing systems at Pine Valley Furniture Company Duplicate Data
Problems with Data Redundancy ,[object Object],[object Object],[object Object],[object Object],[object Object]
SOLUTION:  The DATABASE Approach ,[object Object],[object Object],[object Object],Requires a Database Management System (DBMS)
Database Management System DBMS manages data resources like an operating system manages hardware resources ,[object Object],Order Filing System Invoicing System Payroll System DBMS Central database Contains employee, order, inventory,  pricing, and  customer data
Advantages of the Database Approach ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Costs and Risks of the Database Approach ,[object Object],[object Object],[object Object],[object Object],[object Object]
Elements of the Database Approach ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Segment of an Enterprise Data Model Segment of a Project-Level Data Model
One customer may place many orders, but each order is placed by a single customer    One-to-many relationship
One order has many order lines; each order line is associated with a single order    One-to-many relationship
One product can be in many order lines, each order line refers to a single product    One-to-many relationship
Therefore, one order involves many products and one product is involved in many orders    Many-to-many relationship
Figure 1-4 Enterprise data model for Figure 1-3 segments
Figure 1-5 Components of the Database Environment
Components of the  Database Environment ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The Range of Database Applications ,[object Object],[object Object],[object Object],[object Object]
Figure 1-6 Typical data from a personal database
Figure 1-7 Workgroup database with wireless  local area network
Enterprise Database Applications ,[object Object],[object Object],[object Object],[object Object]
Figure 1-8 An enterprise data warehouse
Evolution of DB Systems
Chapter 2:  The Database Development Process  Modern Database Management 8 th  Edition Jeffrey A. Hoffer, Mary B. Prescott,  Fred R. McFadden © 2007 by Prentice Hall
Objectives ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Enterprise Data Model ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Figure 2-1 Segment from enterprise data model Enterprise data model describes the high-level entities in an organization and the relationship between these entities
Information Systems Architecture (ISA) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Information Engineering ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Information Systems Planning  (Table 2-1) ,[object Object],[object Object],[object Object],[object Object],[object Object]
Identify Strategic Planning Factors (Table 2-2) ,[object Object],[object Object],[object Object]
Identify Corporate Planning Objects (Table 2-3) ,[object Object],[object Object],[object Object],[object Object],[object Object]
Develop Enterprise Model ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Figure 2-2 Example of process decomposition of an order fulfillment function (Pine Valley Furniture) Decomposition = breaking large tasks into smaller tasks in a hierarchical structure chart
Planning Matrixes ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Example business function-to-data entity matrix (Fig. 2-3)
Two Approaches to Database and IS Development ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Systems Development Life Cycle (see also Figures 2.4, 2.5)  Planning Analysis Physical Design Implementation Maintenance Logical Design
Systems Development Life Cycle (see also Figures 2.4, 2.5)  (cont.) Planning Purpose – preliminary understanding Deliverable – request for study  Database activity –   enterprise modeling and early conceptual data modeling Planning Analysis Physical Design Implementation Maintenance Logical Design
Systems Development Life Cycle (see also Figures 2.4, 2.5) (cont.)  Analysis Purpose–thorough requirements analysis and structuring Deliverable–functional system specifications Database activity–Thorough and integrated conceptual data modeling Planning Analysis Physical Design Implementation Maintenance Logical Design
Systems Development Life Cycle (see also Figures 2.4, 2.5) (cont.)  Logical Design Purpose–information requirements elicitation and structure Deliverable–detailed design specifications Database activity–  logical database design (transactions, forms, displays, views, data integrity and security) Planning Analysis Physical Design Implementation Maintenance Logical Design
Systems Development Life Cycle (see also Figures 2.4, 2.5) (cont.)  Physical Design Purpose–develop technology and organizational specifications Deliverable–program/data structures, technology purchases, organization redesigns Database activity–  physical database design (define database to DBMS, physical data organization, database processing programs) Planning Analysis Physical Design Implementation Maintenance Logical Design
Systems Development Life Cycle (see also Figures 2.4, 2.5) (cont.)  Implementation Purpose–programming, testing, training, installation, documenting Deliverable–operational programs, documentation, training materials Database activity–  database implementation, including coded programs, documentation, installation and conversion Planning Analysis Physical Design Implementation Maintenance Logical Design
Systems Development Life Cycle (see also Figures 2.4, 2.5) (cont.)  Maintenance Purpose–monitor, repair, enhance Deliverable–periodic audits Database activity–  database maintenance, performance analysis and tuning, error corrections Planning Analysis Physical Design Implementation Maintenance Logical Design
Prototyping Database Methodology (Figure 2.6)
Prototyping Database Methodology (Figure 2.6)  (cont.)
Prototyping Database Methodology (Figure 2.6)  (cont.)
Prototyping Database Methodology (Figure 2.6)  (cont.)
Prototyping Database Methodology (Figure 2.6)  (cont.)
CASE ,[object Object],[object Object],[object Object],[object Object],[object Object]
Packaged Data Models ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Managing Projects ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Managing Projects: People Involved ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Database Schema ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Different people have different views of the database…these are the external schema The internal schema is the underlying design and implementation Figure 2-7 Three-schema architecture
Figure 2-8 Developing the three-tiered architecture
Figure 2-9 Three-tiered client/server database architecture
Pine Valley Furniture Segment of project data model  (Figure 2-11)
Figure 2-12 Four relations (Pine Valley Furniture)
Figure 2-12 Four relations (Pine Valley Furniture) (cont.)
Chapter 3: Modeling Data in the Organization Modern Database Management 8 th  Edition Jeffrey A. Hoffer, Mary B. Prescott,  Fred R. McFadden © 2007 by Prentice Hall
Objectives ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Business Rules ,[object Object],[object Object],[object Object],[object Object],[object Object]
A Good Business Rule is: ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
A Good Data Name is: ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Data Definitions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
E-R Model Constructs ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Sample E-R Diagram (Figure 3-1)
Relationship degrees specify number of entity types involved Relationship cardinalities specify how many of each entity type is allowed Basic E-R notation (Figure 3-2) Entity symbols A special entity that is also a relationship Relationship symbols Attribute symbols
What Should an Entity Be? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Inappropriate entities Figure 3-4 Example of inappropriate entities System  user System output Appropriate entities
Attributes ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Identifiers (Keys) ,[object Object],[object Object],[object Object]
Characteristics of Identifiers ,[object Object],[object Object],[object Object],[object Object]
Figure 3-7  A  composite  attribute An attribute broken into component parts Figure 3-8  Entity with  multivalued  attribute (Skill)  and  derived  attribute (Years_Employed) Multivalued an employee can have  more than one skill Derived from date employed and current date
Figure 3-9 Simple and composite identifier attributes The identifier is boldfaced and underlined
Figure 3-19  Simple example of time-stamping This attribute that is both multivalued  and  composite
More on Relationships ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Figure 3-10 Relationship types and instances a) Relationship type b) Relationship instances
Degree of Relationships ,[object Object],[object Object],[object Object],[object Object]
Degree of relationships – from Figure 3-2 Entities of two different types related to each other Entities of three different types related to each other One entity related to another of the same entity type
Cardinality of Relationships ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Cardinality Constraints ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Figure 3-12 Examples of relationships of different degrees a) Unary relationships
Figure 3-12 Examples of relationships of different degrees (cont.) b) Binary relationships
Figure 3-12 Examples of relationships of different degrees (cont.) c) Ternary relationship Note: a relationship can have attributes of its own
Figure 3-17 Examples of cardinality constraints a) Mandatory cardinalities A patient must have recorded at least one history, and can have many A patient history is recorded for one and only one patient
Figure 3-17 Examples of cardinality constraints (cont.) b) One optional, one mandatory An employee can be assigned to any number of projects, or may not be assigned to any at all A project must be assigned to at least one employee, and may be assigned to many
Figure 3-17 Examples of cardinality constraints (cont.) a) Optional cardinalities A person is is married to at most one other person, or may not be married at all
Entities can be related to one another in more than one way Figure 3-21 Examples of multiple relationships a) Employees and departments
Figure 3-21 Examples of multiple relationships (cont.) b) Professors and courses (fixed lower limit constraint) Here, min cardinality constraint is 2
Figure 3-15a and 3-15b Multivalued attributes can be represented as relationships simple composite
Strong vs. Weak Entities, and Identifying Relationships ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Strong entity Weak entity Identifying relationship
Associative Entities ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Figure 3-11a A binary relationship with an attribute Here, the date completed attribute pertains specifically to the employee’s completion of a course…it is an attribute of the  relationship
Figure 3-11b An associative entity (CERTIFICATE) Associative entity is like a relationship with an attribute, but it is also considered to be an entity in its own right. Note that the many-to-many cardinality between entities in Figure 3-11a has been replaced by two one-to-many relationships with the associative entity.
Figure 3-13c An associative entity – bill of materials structure This could just be a relationship with attributes…it’s a judgment call
Figure 3-18 Ternary relationship as an associative entity
Microsoft Visio Example for E-R diagram Different modeling software tools may have different notation for the same constructs
Chapter 4: The Enhanced ER Model and Business Rules Modern Database Management 8 th  Edition Jeffrey A. Hoffer, Mary B. Prescott,  Fred R. McFadden © 2007 by Prentice Hall
Objectives ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Supertypes and Subtypes ,[object Object],[object Object],[object Object],[object Object],[object Object]
Figure 4-1 Basic notation for supertype/subtype notation a) EER  notation
Different modeling tools may have different notation for the same modeling constructs  b) Microsoft Visio Notation Figure 4-1 Basic notation for supertype/subtype notation (cont.)
Figure 4-2  Employee supertype with three subtypes All employee subtypes will have emp nbr, name, address, and date-hired Each employee subtype will also have its own attributes
Relationships and Subtypes ,[object Object],[object Object]
Figure 4-3 Supertype/subtype relationships in a hospital Both outpatients and resident patients are cared for by a responsible physician Only resident patients are assigned to a bed
Generalization and Specialization ,[object Object],[object Object]
Figure 4-4 Example of generalization a) Three entity types: CAR, TRUCK, and MOTORCYCLE All these types of vehicles have common attributes
Figure 4-4 Example of generalization (cont.) So we put the shared attributes in a supertype Note: no subtype for motorcycle, since it has no unique attributes b) Generalization to VEHICLE supertype
Figure 4-5 Example of specialization a) Entity type PART Only applies to manufactured parts Applies only to purchased parts
b) Specialization to MANUFACTURED PART and PURCHASED PART Created 2 subtypes Figure 4-5 Example of specialization (cont.) Note: multivalued attribute was replaced by an associative entity relationship to another entity
Constraints in Supertype/ Completeness Constraint ,[object Object],[object Object],[object Object]
Figure 4-6 Examples of completeness constraints a) Total  specialization rule A patient must be either an outpatient or a resident patient
b) Partial specialization rule Figure 4-6 Examples of completeness constraints (cont.) A vehicle could be a car, a truck, or neither
Constraints in Supertype/ Disjointness constraint ,[object Object],[object Object],[object Object]
a) Disjoint rule Figure 4-7 Examples of disjointness constraints A patient can either be outpatient or resident, but not both
b) Overlap rule Figure 4-7 Examples of disjointness constraints (cont.) A part may be both purchased and manufactured
Constraints in Supertype/ Subtype Discriminators ,[object Object],[object Object],[object Object]
Figure 4-8 Introducing a subtype discriminator ( disjoint  rule) A simple attribute with different possible values indicating the subtype
Figure 4-9 Subtype discriminator ( overlap  rule) A composite attribute with sub-attributes indicating “yes” or “no” to determine whether it is of each subtype
Figure 4-10 Example of supertype/subtype hierarchy
Entity Clusters ,[object Object],[object Object],[object Object]
Figure 4-13a  Possible entity clusters for Pine Valley Furniture in Microsoft Visio Related groups of entities could become clusters
Figure 4-13b EER diagram of PVF entity clusters More readable, isn’t it?
Figure 4-14 Manufacturing entity cluster Detail for a single cluster
Chapter 4: The Enhanced ER Model and Business Rules Modern Database Management 8 th  Edition Jeffrey A. Hoffer, Mary B. Prescott,  Fred R. McFadden © 2007 by Prentice Hall
Objectives ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Supertypes and Subtypes ,[object Object],[object Object],[object Object],[object Object],[object Object]
Figure 4-1 Basic notation for supertype/subtype notation a) EER  notation
Different modeling tools may have different notation for the same modeling constructs  b) Microsoft Visio Notation Figure 4-1 Basic notation for supertype/subtype notation (cont.)
Figure 4-2  Employee supertype with three subtypes All employee subtypes will have emp nbr, name, address, and date-hired Each employee subtype will also have its own attributes
Relationships and Subtypes ,[object Object],[object Object]
Figure 4-3 Supertype/subtype relationships in a hospital Both outpatients and resident patients are cared for by a responsible physician Only resident patients are assigned to a bed
Generalization and Specialization ,[object Object],[object Object]
Figure 4-4 Example of generalization a) Three entity types: CAR, TRUCK, and MOTORCYCLE All these types of vehicles have common attributes
Figure 4-4 Example of generalization (cont.) So we put the shared attributes in a supertype Note: no subtype for motorcycle, since it has no unique attributes b) Generalization to VEHICLE supertype
Figure 4-5 Example of specialization a) Entity type PART Only applies to manufactured parts Applies only to purchased parts
b) Specialization to MANUFACTURED PART and PURCHASED PART Created 2 subtypes Figure 4-5 Example of specialization (cont.) Note: multivalued attribute was replaced by an associative entity relationship to another entity
Constraints in Supertype/ Completeness Constraint ,[object Object],[object Object],[object Object]
Figure 4-6 Examples of completeness constraints a) Total  specialization rule A patient must be either an outpatient or a resident patient
b) Partial specialization rule Figure 4-6 Examples of completeness constraints (cont.) A vehicle could be a car, a truck, or neither
Constraints in Supertype/ Disjointness constraint ,[object Object],[object Object],[object Object]
a) Disjoint rule Figure 4-7 Examples of disjointness constraints A patient can either be outpatient or resident, but not both
b) Overlap rule Figure 4-7 Examples of disjointness constraints (cont.) A part may be both purchased and manufactured
Constraints in Supertype/ Subtype Discriminators ,[object Object],[object Object],[object Object]
Figure 4-8 Introducing a subtype discriminator ( disjoint  rule) A simple attribute with different possible values indicating the subtype
Figure 4-9 Subtype discriminator ( overlap  rule) A composite attribute with sub-attributes indicating “yes” or “no” to determine whether it is of each subtype
Figure 4-10 Example of supertype/subtype hierarchy
Entity Clusters ,[object Object],[object Object],[object Object]
Figure 4-13a  Possible entity clusters for Pine Valley Furniture in Microsoft Visio Related groups of entities could become clusters
Figure 4-13b EER diagram of PVF entity clusters More readable, isn’t it?
Figure 4-14 Manufacturing entity cluster Detail for a single cluster
Packaged data models provide generic models that can be customized for a particular organization’s business rules
Business rules ,[object Object],[object Object],[object Object],[object Object],[object Object]
Figure 4-18 EER diagram to describe business rules
Types of Action Assertions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Stating an Action Assertion ,[object Object],[object Object],[object Object],Action assertions identify corresponding objects that constrain the ability to perform actions on anchor objects
Figure 4-19 Data model segment for class scheduling
Figure 4-20  Business Rule 1: For a faculty member to be assigned to teach a section of a course, the faculty member must be qualified to teach the course for which that section is scheduled Action assertion Anchor object Corresponding object Corresponding object In this case, the action assertion is a  R estriction
Figure 4-21  Business Rule 2: For a faculty member to be assigned to teach a section of a course, the faculty member must not be assigned to teach a total of more than three course sections Action assertion Anchor object Corresponding object In this case, the action assertion is an U pper  LIM it
Chapter 5: Logical Database Design and the Relational Model Modern Database Management 8 th  Edition Jeffrey A. Hoffer, Mary B. Prescott,  Fred R. McFadden © 2007 by Prentice Hall
Objectives ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Relation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Correspondence with E-R Model ,[object Object],[object Object],[object Object],[object Object]
Key Fields ,[object Object],[object Object],[object Object],[object Object],[object Object]
Figure 5-3 Schema for four relations (Pine Valley Furniture Company) Primary Key Foreign Key  (implements 1:N relationship between customer and order) Combined, these are a  composite primary key  (uniquely identifies the order line)…individually they are  foreign keys  (implement M:N relationship between order and product)
Integrity Constraints ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Domain definitions enforce domain integrity constraints
Integrity Constraints ,[object Object],[object Object],[object Object],[object Object],[object Object]
Figure 5-5  Referential integrity constraints (Pine Valley Furniture) Referential integrity constraints are drawn via arrows from dependent to parent table
Figure 5-6 SQL table definitions Referential integrity constraints are implemented with foreign key to primary key references
Transforming EER Diagrams into Relations ,[object Object],[object Object],[object Object],[object Object]
(a) CUSTOMER entity type with simple attributes Figure 5-8 Mapping a regular entity (b) CUSTOMER relation
(a) CUSTOMER entity type with composite attribute Figure 5-9 Mapping a composite attribute (b) CUSTOMER relation with address detail
Figure 5-10 Mapping an entity with a multivalued attribute One–to–many relationship between original entity and new relation (a) Multivalued attribute becomes a separate relation with foreign key (b)
Transforming EER Diagrams into Relations (cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object]
Figure 5-11 Example of mapping a weak entity a) Weak entity DEPENDENT
NOTE: the domain constraint for the foreign key should NOT allow  null  value if DEPENDENT is a weak entity Foreign key Figure 5-11 Example of mapping a weak entity (cont.) b) Relations resulting from weak entity Composite primary key
Transforming EER Diagrams into Relations (cont.) ,[object Object],[object Object],[object Object],[object Object]
Figure 5-12 Example of mapping a 1:M relationship a) Relationship between customers and orders Note the mandatory one Again, no null value in the foreign key…this is because of the mandatory minimum cardinality Foreign key b) Mapping the relationship
Figure 5-13 Example of mapping an M:N relationship a) Completes relationship (M:N) The  Completes  relationship will need to become a separate relation
New  intersection relation Figure 5-13 Example of mapping an M:N relationship (cont.) b) Three resulting relations Foreign key Foreign key Composite primary key
Figure 5-14 Example of mapping a binary 1:1 relationship a) In_charge relationship (1:1) Often in 1:1 relationships, one direction is optional.
b) Resulting relations Figure 5-14 Example of mapping a binary 1:1 relationship (cont.) Foreign key goes in the relation on the optional side, Matching the primary key on the mandatory side
Transforming EER Diagrams into Relations (cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Figure 5-15 Example of mapping an associative entity a) An associative entity
Figure 5-15 Example of mapping an associative entity (cont.) b) Three resulting relations Composite primary key formed from the two foreign keys
Figure 5-16 Example of mapping an associative entity with an identifier a) SHIPMENT associative entity
Figure 5-16 Example of mapping an associative entity with an identifier (cont.) b) Three resulting relations Primary key differs from foreign keys
Transforming EER Diagrams into Relations (cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object]
Figure 5-17 Mapping a unary 1:N relationship (a) EMPLOYEE entity with unary relationship (b) EMPLOYEE relation with recursive foreign key
Figure 5-18 Mapping a unary M:N relationship (a) Bill-of-materials relationships (M:N) (b) ITEM and COMPONENT relations
Transforming EER Diagrams into Relations (cont.) ,[object Object],[object Object],[object Object]
Figure 5-19 Mapping a ternary relationship a) PATIENT TREATMENT Ternary relationship with associative entity
b) Mapping the ternary relationship PATIENT TREATMENT Remember that the primary key MUST be unique Figure 5-19 Mapping a ternary relationship (cont.) This is why treatment date and time are included in the composite primary key But this makes a very cumbersome key… It would be better to create a surrogate key like Treatment#
Transforming EER Diagrams into Relations (cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object]
Figure 5-20 Supertype/subtype relationships
Figure 5-21  Mapping Supertype/subtype relationships to relations These are implemented as one-to-one relationships
Data Normalization ,[object Object],[object Object]
Well-Structured Relations ,[object Object],[object Object],[object Object],[object Object],[object Object],General rule of thumb: A table should not pertain to more than one entity type
Example–Figure 5-2b Question–Is this a relation?   Answer–Yes: Unique rows and no multivalued attributes Question–What’s the primary key?   Answer–Composite: Emp_ID, Course_Title
Anomalies in this Table ,[object Object],[object Object],[object Object],[object Object],[object Object]
Functional Dependencies and Keys ,[object Object],[object Object],[object Object],[object Object],[object Object]
Figure 5.22 Steps in normalization
First Normal Form ,[object Object],[object Object],[object Object],[object Object],[object Object]
Table with multivalued attributes, not in 1 st  normal form Note: this is NOT a relation
Table with no multivalued attributes and unique rows, in 1 st  normal form Note: this is relation, but not a well-structured one
Anomalies in this Table ,[object Object],[object Object],[object Object],[object Object],[object Object]
Second Normal Form ,[object Object],[object Object],[object Object]
Order_ID    Order_Date, Customer_ID, Customer_Name, Customer_Address Therefore, NOT in 2 nd  Normal Form Customer_ID    Customer_Name, Customer_Address Product_ID    Product_Description, Product_Finish, Unit_Price Order_ID, Product_ID    Order_Quantity Figure 5-27 Functional dependency diagram for INVOICE
Partial dependencies are removed, but there are still transitive dependencies Getting it into Second Normal Form Figure 5-28 Removing partial dependencies
Third Normal Form ,[object Object],[object Object],[object Object]
Transitive dependencies are removed Figure 5-28 Removing partial dependencies Getting it into Third Normal Form
Merging Relations ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Enterprise Keys ,[object Object],[object Object]
Figure 5-31 Enterprise keys a) Relations with enterprise key b) Sample data with enterprise key
Chapter 6: Physical Database Design and Performance Modern Database Management 8 th  Edition Jeffrey A. Hoffer, Mary B. Prescott,  Fred R. McFadden © 2007 by Prentice Hall
Objectives ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Physical Database Design ,[object Object],[object Object]
Physical Design Process ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Inputs ,[object Object],[object Object],[object Object],[object Object],[object Object],Leads to Decisions
Figure 6-1 Composite usage map (Pine Valley Furniture Company)
Figure 6-1 Composite usage map (Pine Valley Furniture Company) (cont.) Data volumes
Figure 6-1 Composite usage map (Pine Valley Furniture Company) (cont.) Access Frequencies (per hour)
Figure 6-1 Composite usage map (Pine Valley Furniture Company) (cont.) Usage analysis: 140 purchased parts accessed per hour   80 quotations accessed from these 140 purchased part accesses   70 suppliers accessed from these 80 quotation accesses
Figure 6-1 Composite usage map (Pine Valley Furniture Company) (cont.) Usage analysis: 75 suppliers accessed per hour   40 quotations accessed from these 75 supplier accesses   40 purchased parts accessed from these 40 quotation accesses
Designing Fields ,[object Object],[object Object],[object Object],[object Object],[object Object]
Choosing Data Types ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Figure 6-2  Example code look-up table (Pine Valley Furniture Company) Code saves space, but costs an additional lookup to obtain actual value
Field Data Integrity ,[object Object],[object Object],[object Object],[object Object],Sarbanes-Oxley Act (SOX) legislates importance of financial data integrity
Handling Missing Data ,[object Object],[object Object],[object Object],Triggers can be used to perform these operations
Physical Records ,[object Object],[object Object],[object Object]
Denormalization ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Figure 6-3  A possible denormalization situation: two entities with one-to-one relationship
Figure 6-4  A possible denormalization situation: a many-to-many relationship with nonkey attributes Extra table access required  Null description possible
Figure 6-5 A possible denormalization situation: reference data Extra table access required  Data duplication
Partitioning ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Partitions often correspond with User Schemas (user views)
Partitioning (cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Data Replication ,[object Object],[object Object],[object Object],[object Object]
Designing Physical Files ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Figure 6-4  Physical file terminology in an Oracle environment
File Organizations ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Figure 6-7a  Sequential file organization If not sorted Average time to find desired record = n/2 1 2 n Records of the file are stored in sequence by the primary key field values If sorted –  every insert or delete requires resort
Indexed File Organizations ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Figure 6-7b B-tree index uses a  tree search Average time to find desired record =  depth of the tree Leaves of the tree are all at same level   consistent access time
Figure 6-7c Hashed  file or index organization  Hash algorithm Usually uses division-remainder to determine record position. Records with same position are grouped in lists
Figure 6-8 Bitmap  index index organization  Bitmap saves on space requirements Rows - possible values of the attribute Columns - table rows Bit indicates whether the attribute of a row has the values
Figure 6-9  Join  Indexes–speeds up join operations
Clustering Files ,[object Object],[object Object],[object Object],[object Object]
Rules for Using Indexes ,[object Object],[object Object],[object Object],[object Object],[object Object]
Rules for Using Indexes (cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object]
RAID ,[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],Here, pages 1-4 can be read/written simultaneously
Raid Types (Figure 6-10) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Database Architectures  (Figure 6-11) Legacy Systems Current Technology Data Warehouses
Chapter 7: Introduction to SQL Modern Database Management 8 th  Edition Jeffrey A. Hoffer, Mary B. Prescott,  Fred R. McFadden © 2007 by Prentice Hall
Objectives ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
SQL Overview ,[object Object],[object Object],[object Object]
History of SQL ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Purpose of SQL Standard ,[object Object],[object Object],[object Object],[object Object],[object Object]
Benefits of a Standardized Relational Language ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
SQL Environment ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Figure 7-1 A simplified schematic of a typical SQL environment, as described by the SQL-2003 standard
Some SQL Data types
Figure 7-4  DDL, DML, DCL, and the database development process
SQL Database Definition ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Table Creation Figure 7-5 General syntax for CREATE TABLE ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The following slides create tables for this enterprise data model
Figure 7-6 SQL database definition commands for Pine Valley Furniture Overall table definitions
Defining attributes and their data types
Non-nullable specification Identifying primary key Primary keys can never have NULL values
Non-nullable specifications Primary key Some primary keys are composite– composed of multiple attributes
Default value Domain constraint Controlling the values in attributes
Primary key of  parent table Identifying foreign keys and establishing relationships Foreign key of  dependent table
Data Integrity Controls ,[object Object],[object Object],[object Object],[object Object],[object Object]
Relational integrity is enforced via the primary-key to foreign-key match Figure 7-7 Ensuring data integrity through updates
Changing and Removing Tables ,[object Object],[object Object],[object Object],[object Object]
Schema Definition ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Insert Statement ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Creating Tables with Identity Columns ,[object Object],[object Object],New with SQL:2003
Delete Statement ,[object Object],[object Object],[object Object],[object Object],[object Object]
Update Statement ,[object Object],[object Object]
Merge Statement Makes it easier to update a table…allows combination of Insert and Update in one statement Useful for updating master tables with new data
SELECT Statement ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object]
SELECT Example ,[object Object],[object Object],[object Object],[object Object],Table 7-3: Comparison Operators in SQL
SELECT Example Using Alias ,[object Object],[object Object],[object Object],[object Object]
SELECT Example  Using a Function ,[object Object],[object Object],[object Object],[object Object]
SELECT Example–Boolean Operators ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Note: the LIKE operator allows you to compare strings using wildcards. For example, the % wildcard in ‘%Desk’  indicates that all strings that have any number of characters preceding the word “Desk” will be allowed
Venn Diagram from Previous Query
SELECT Example –  Sorting Results with the ORDER BY Clause ,[object Object],[object Object],[object Object],[object Object],[object Object],Note: the IN operator in this example allows you to include rows whose STATE value is either FL, TX, CA, or HI. It is more efficient than separate OR conditions
SELECT Example–  Categorizing Results Using the GROUP BY Clause ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
SELECT Example–  Qualifying Results by Categories  Using the HAVING Clause ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Using and Defining Views ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Sample CREATE VIEW ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Advantages of Views ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Disadvantages of Views ,[object Object],[object Object]
Chapter 8: Advanced SQL Modern Database Management 8 th  Edition Jeffrey A. Hoffer, Mary B. Prescott,  Fred R. McFadden © 2007 by Prentice Hall
Objectives ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Processing Multiple Tables–Joins ,[object Object],[object Object],[object Object],[object Object],[object Object],The common columns in joined tables are usually the primary key  of the  dominant table and the foreign key of the dependent table in 1:M relationships
The following slides create tables for this enterprise data model
These tables are used in queries that follow Figure 8-1 Pine Valley Furniture Company Customer and Order tables with pointers from customers to their orders
[object Object],[object Object],[object Object],[object Object],Natural Join Example Note: from Fig. 1, you see that only 10 Customers have links with orders.    Only 10 rows will be returned from this INNER join. Join involves multiple tables in FROM clause ON clause performs the equality check for common columns of the two tables
[object Object],[object Object],[object Object],[object Object],Outer Join Example  (Microsoft Syntax) Unlike INNER join, this will include customer rows with no matching order rows LEFT OUTER JOIN syntax with ON  causes customer data to appear even if there is no corresponding order data
Results Unlike INNER join, this will include customer rows with no matching order rows
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Multiple Table Join Example Four tables involved in this join Each pair of tables requires an equality-check condition in the WHERE clause, matching primary keys against foreign keys
Figure 8-2 Results from a four-table join From CUSTOMER_T table From ORDER_T table From PRODUCT_T table
Processing Multiple Tables  Using Subqueries ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],Subquery Example Subquery is embedded in parentheses. In this case it returns a list that will be used in the WHERE clause of the outer query The IN operator will test to see if the CUSTOMER_ID value of a row is included in the list returned from the subquery
Correlated vs. Noncorrelated Subqueries ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Figure 8-3a Processing a noncorrelated subquery No reference to data in outer query, so subquery executes once only These are the only customers that have IDs in the ORDER_T table ,[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Correlated Subquery Example The subquery is testing for a value that comes from the outer query  The EXISTS operator will return a TRUE value if the subquery resulted in a non-empty set, otherwise it returns a FALSE
Figure 8-3b Processing a correlated subquery Subquery refers to outer-query data, so executes once for each row of outer query Note: only the orders that involve products with Natural Ash will be included in the final results
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Another Subquery Example The WHERE clause normally cannot include aggregate functions, but because the aggregate is performed in the subquery its result can be used in the outer query’s WHERE clause  One column of the subquery is an aggregate function that has an alias name. That alias can then be referred to in the outer query Subquery forms the derived table used in the FROM clause of the outer query
Union Queries ,[object Object],First query Second query Combine
Conditional Expressions Using Case Syntax ,[object Object]
Ensuring Transaction Integrity ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Figure 8-5 An SQL Transaction sequence (in pseudocode)
Data Dictionary Facilities ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
SQL:1999 and SQL:2003 Enhancements/Extensions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],SQL:1999 and SQL:2003 Enhancements/Extensions (cont.)
Routines and Triggers ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Figure 8-6 Triggers contrasted with stored procedures Procedures are called explicitly Triggers are event-driven Source : adapted from Mullins, 1995.
Figure 8-7 Simplified trigger syntax, SQL:2003 Figure 8-8 Create routine syntax, SQL:2003
Embedded and Dynamic SQL ,[object Object],[object Object],[object Object],[object Object]
Chapter 9:  The Client/Server Database Environment Modern Database Management 8 th  Edition Jeffrey A. Hoffer, Mary B. Prescott,  Fred R. McFadden © 2007 by Prentice Hall
Objectives ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Client/Server Systems ,[object Object],[object Object],[object Object],[object Object],[object Object]
Application Logic in C/S Systems GUI Interface Procedures, functions, programs DBMS activities ,[object Object],[object Object],[object Object],[object Object]
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,

More Related Content

What's hot

Transaction management DBMS
Transaction  management DBMSTransaction  management DBMS
Transaction management DBMSMegha Patel
 
Architectural structures and views
Architectural structures and viewsArchitectural structures and views
Architectural structures and viewsDr Reeja S R
 
file system in operating system
file system in operating systemfile system in operating system
file system in operating systemtittuajay
 
Software Engineering- ERD DFD Decision Tree and Table
Software Engineering- ERD DFD Decision Tree and TableSoftware Engineering- ERD DFD Decision Tree and Table
Software Engineering- ERD DFD Decision Tree and TableNishu Rastogi
 
Introduction: Databases and Database Users
Introduction: Databases and Database UsersIntroduction: Databases and Database Users
Introduction: Databases and Database Userssontumax
 
Normalization of Data Base
Normalization of Data BaseNormalization of Data Base
Normalization of Data BaseRavinder Kamboj
 
Database systems - Chapter 2
Database systems - Chapter 2Database systems - Chapter 2
Database systems - Chapter 2shahab3
 
Dbms 3: 3 Schema Architecture
Dbms 3: 3 Schema ArchitectureDbms 3: 3 Schema Architecture
Dbms 3: 3 Schema ArchitectureAmiya9439793168
 
Formal Specification in Software Engineering SE9
Formal Specification in Software Engineering SE9Formal Specification in Software Engineering SE9
Formal Specification in Software Engineering SE9koolkampus
 
Requirements Engineering Processes in Software Engineering SE6
Requirements Engineering Processes in Software Engineering SE6Requirements Engineering Processes in Software Engineering SE6
Requirements Engineering Processes in Software Engineering SE6koolkampus
 
Database design process
Database design processDatabase design process
Database design processTayyab Hameed
 
SRS(software requirement specification)
SRS(software requirement specification)SRS(software requirement specification)
SRS(software requirement specification)Akash Kumar Dhameja
 

What's hot (20)

Transaction management DBMS
Transaction  management DBMSTransaction  management DBMS
Transaction management DBMS
 
Architectural structures and views
Architectural structures and viewsArchitectural structures and views
Architectural structures and views
 
DBMS and its Models
DBMS and its ModelsDBMS and its Models
DBMS and its Models
 
Data Flow Diagram or DFD
Data Flow Diagram  or DFDData Flow Diagram  or DFD
Data Flow Diagram or DFD
 
file system in operating system
file system in operating systemfile system in operating system
file system in operating system
 
Software Engineering- ERD DFD Decision Tree and Table
Software Engineering- ERD DFD Decision Tree and TableSoftware Engineering- ERD DFD Decision Tree and Table
Software Engineering- ERD DFD Decision Tree and Table
 
Introduction: Databases and Database Users
Introduction: Databases and Database UsersIntroduction: Databases and Database Users
Introduction: Databases and Database Users
 
Normalization of Data Base
Normalization of Data BaseNormalization of Data Base
Normalization of Data Base
 
Staffing level estimation
Staffing level estimation Staffing level estimation
Staffing level estimation
 
Database systems - Chapter 2
Database systems - Chapter 2Database systems - Chapter 2
Database systems - Chapter 2
 
Dbms 3: 3 Schema Architecture
Dbms 3: 3 Schema ArchitectureDbms 3: 3 Schema Architecture
Dbms 3: 3 Schema Architecture
 
View of data DBMS
View of data DBMSView of data DBMS
View of data DBMS
 
Distributed DBMS - Unit 3 - Distributed DBMS Architecture
Distributed DBMS - Unit 3 - Distributed DBMS ArchitectureDistributed DBMS - Unit 3 - Distributed DBMS Architecture
Distributed DBMS - Unit 3 - Distributed DBMS Architecture
 
Formal Specification in Software Engineering SE9
Formal Specification in Software Engineering SE9Formal Specification in Software Engineering SE9
Formal Specification in Software Engineering SE9
 
Requirements Engineering Processes in Software Engineering SE6
Requirements Engineering Processes in Software Engineering SE6Requirements Engineering Processes in Software Engineering SE6
Requirements Engineering Processes in Software Engineering SE6
 
Database design process
Database design processDatabase design process
Database design process
 
Software Engineering by Pankaj Jalote
Software Engineering by Pankaj JaloteSoftware Engineering by Pankaj Jalote
Software Engineering by Pankaj Jalote
 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
 
DFD ppt
DFD pptDFD ppt
DFD ppt
 
SRS(software requirement specification)
SRS(software requirement specification)SRS(software requirement specification)
SRS(software requirement specification)
 

Similar to Modern database management jeffrey a. hoffer, mary b. prescott,

Database Systems.ppt
Database Systems.pptDatabase Systems.ppt
Database Systems.pptArbazAli27
 
Ch 1 D B Environment
Ch 1  D B  EnvironmentCh 1  D B  Environment
Ch 1 D B Environmentguest8fdbdd
 
Database Management System, Lecture-1
Database Management System, Lecture-1Database Management System, Lecture-1
Database Management System, Lecture-1Sonia Mim
 
Database Management System Introduction
Database Management System IntroductionDatabase Management System Introduction
Database Management System IntroductionSmriti Jain
 
Advanced Database Management System_Introduction Slide.ppt
Advanced Database Management System_Introduction Slide.pptAdvanced Database Management System_Introduction Slide.ppt
Advanced Database Management System_Introduction Slide.pptBikalAdhikari4
 
M.sc. engg (ict) admission guide database management system 4
M.sc. engg (ict) admission guide   database management system 4M.sc. engg (ict) admission guide   database management system 4
M.sc. engg (ict) admission guide database management system 4Syed Ariful Islam Emon
 
964 database development process intro1
964 database development process intro1964 database development process intro1
964 database development process intro1Snovia
 
Behind The Scenes Databases And Information Systems 6
Behind The Scenes  Databases And Information Systems 6Behind The Scenes  Databases And Information Systems 6
Behind The Scenes Databases And Information Systems 6guest4a9cdb
 
Data processing in Industrial Systems course notes after week 5
Data processing in Industrial Systems course notes after week 5Data processing in Industrial Systems course notes after week 5
Data processing in Industrial Systems course notes after week 5Ufuk Cebeci
 
database introductoin optimization1-app6891.pdf
database introductoin optimization1-app6891.pdfdatabase introductoin optimization1-app6891.pdf
database introductoin optimization1-app6891.pdfparveen204931475
 
Introduction to Database
Introduction to DatabaseIntroduction to Database
Introduction to DatabaseSiti Ismail
 

Similar to Modern database management jeffrey a. hoffer, mary b. prescott, (20)

DBMS
DBMSDBMS
DBMS
 
Database Systems.ppt
Database Systems.pptDatabase Systems.ppt
Database Systems.ppt
 
Lecture2 is331 data&infomanag(databaseenv)
Lecture2 is331 data&infomanag(databaseenv)Lecture2 is331 data&infomanag(databaseenv)
Lecture2 is331 data&infomanag(databaseenv)
 
Ch 1 D B Environment
Ch 1  D B  EnvironmentCh 1  D B  Environment
Ch 1 D B Environment
 
Lecture 3 note.pptx
Lecture 3 note.pptxLecture 3 note.pptx
Lecture 3 note.pptx
 
Database 1 Introduction
Database 1   IntroductionDatabase 1   Introduction
Database 1 Introduction
 
Database Management System, Lecture-1
Database Management System, Lecture-1Database Management System, Lecture-1
Database Management System, Lecture-1
 
Database Management System Introduction
Database Management System IntroductionDatabase Management System Introduction
Database Management System Introduction
 
Advanced Database Management System_Introduction Slide.ppt
Advanced Database Management System_Introduction Slide.pptAdvanced Database Management System_Introduction Slide.ppt
Advanced Database Management System_Introduction Slide.ppt
 
M.sc. engg (ict) admission guide database management system 4
M.sc. engg (ict) admission guide   database management system 4M.sc. engg (ict) admission guide   database management system 4
M.sc. engg (ict) admission guide database management system 4
 
Ch1- Introduction to dbms
Ch1- Introduction to dbmsCh1- Introduction to dbms
Ch1- Introduction to dbms
 
964 database development process intro1
964 database development process intro1964 database development process intro1
964 database development process intro1
 
Behind The Scenes Databases And Information Systems 6
Behind The Scenes  Databases And Information Systems 6Behind The Scenes  Databases And Information Systems 6
Behind The Scenes Databases And Information Systems 6
 
Dbms models
Dbms modelsDbms models
Dbms models
 
data base manage ment
data base manage mentdata base manage ment
data base manage ment
 
Data processing in Industrial Systems course notes after week 5
Data processing in Industrial Systems course notes after week 5Data processing in Industrial Systems course notes after week 5
Data processing in Industrial Systems course notes after week 5
 
RDBMS to NoSQL. An overview.
RDBMS to NoSQL. An overview.RDBMS to NoSQL. An overview.
RDBMS to NoSQL. An overview.
 
database introductoin optimization1-app6891.pdf
database introductoin optimization1-app6891.pdfdatabase introductoin optimization1-app6891.pdf
database introductoin optimization1-app6891.pdf
 
Introduction to Database
Introduction to DatabaseIntroduction to Database
Introduction to Database
 
20CS402_Unit_1.pptx
20CS402_Unit_1.pptx20CS402_Unit_1.pptx
20CS402_Unit_1.pptx
 

Recently uploaded

How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinojohnmickonozaleda
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxPoojaSen20
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 

Recently uploaded (20)

YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipino
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 

Modern database management jeffrey a. hoffer, mary b. prescott,

  • 1.
  • 2.
  • 3. Chapter 1: The Database Environment Modern Database Management 8 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred R. McFadden © 2007 by Prentice Hall
  • 4.
  • 5.
  • 6. Figure 1-1a Data in context Context helps users understand data
  • 7. Graphical displays turn data into useful information that managers can use for decision making and interpretation Figure 1-1b Summarized data
  • 8. Descriptions of the properties or characteristics of the data, including data types, field sizes, allowable values, and data context
  • 9.
  • 10.
  • 11. Figure 1-3 Old file processing systems at Pine Valley Furniture Company Duplicate Data
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18. Segment of an Enterprise Data Model Segment of a Project-Level Data Model
  • 19. One customer may place many orders, but each order is placed by a single customer  One-to-many relationship
  • 20. One order has many order lines; each order line is associated with a single order  One-to-many relationship
  • 21. One product can be in many order lines, each order line refers to a single product  One-to-many relationship
  • 22. Therefore, one order involves many products and one product is involved in many orders  Many-to-many relationship
  • 23. Figure 1-4 Enterprise data model for Figure 1-3 segments
  • 24. Figure 1-5 Components of the Database Environment
  • 25.
  • 26.
  • 27.
  • 28. Figure 1-6 Typical data from a personal database
  • 29. Figure 1-7 Workgroup database with wireless local area network
  • 30.
  • 31. Figure 1-8 An enterprise data warehouse
  • 32. Evolution of DB Systems
  • 33. Chapter 2: The Database Development Process Modern Database Management 8 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred R. McFadden © 2007 by Prentice Hall
  • 34.
  • 35.
  • 36. Figure 2-1 Segment from enterprise data model Enterprise data model describes the high-level entities in an organization and the relationship between these entities
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43. Figure 2-2 Example of process decomposition of an order fulfillment function (Pine Valley Furniture) Decomposition = breaking large tasks into smaller tasks in a hierarchical structure chart
  • 44.
  • 45. Example business function-to-data entity matrix (Fig. 2-3)
  • 46.
  • 47. Systems Development Life Cycle (see also Figures 2.4, 2.5) Planning Analysis Physical Design Implementation Maintenance Logical Design
  • 48. Systems Development Life Cycle (see also Figures 2.4, 2.5) (cont.) Planning Purpose – preliminary understanding Deliverable – request for study Database activity – enterprise modeling and early conceptual data modeling Planning Analysis Physical Design Implementation Maintenance Logical Design
  • 49. Systems Development Life Cycle (see also Figures 2.4, 2.5) (cont.) Analysis Purpose–thorough requirements analysis and structuring Deliverable–functional system specifications Database activity–Thorough and integrated conceptual data modeling Planning Analysis Physical Design Implementation Maintenance Logical Design
  • 50. Systems Development Life Cycle (see also Figures 2.4, 2.5) (cont.) Logical Design Purpose–information requirements elicitation and structure Deliverable–detailed design specifications Database activity– logical database design (transactions, forms, displays, views, data integrity and security) Planning Analysis Physical Design Implementation Maintenance Logical Design
  • 51. Systems Development Life Cycle (see also Figures 2.4, 2.5) (cont.) Physical Design Purpose–develop technology and organizational specifications Deliverable–program/data structures, technology purchases, organization redesigns Database activity– physical database design (define database to DBMS, physical data organization, database processing programs) Planning Analysis Physical Design Implementation Maintenance Logical Design
  • 52. Systems Development Life Cycle (see also Figures 2.4, 2.5) (cont.) Implementation Purpose–programming, testing, training, installation, documenting Deliverable–operational programs, documentation, training materials Database activity– database implementation, including coded programs, documentation, installation and conversion Planning Analysis Physical Design Implementation Maintenance Logical Design
  • 53. Systems Development Life Cycle (see also Figures 2.4, 2.5) (cont.) Maintenance Purpose–monitor, repair, enhance Deliverable–periodic audits Database activity– database maintenance, performance analysis and tuning, error corrections Planning Analysis Physical Design Implementation Maintenance Logical Design
  • 55. Prototyping Database Methodology (Figure 2.6) (cont.)
  • 56. Prototyping Database Methodology (Figure 2.6) (cont.)
  • 57. Prototyping Database Methodology (Figure 2.6) (cont.)
  • 58. Prototyping Database Methodology (Figure 2.6) (cont.)
  • 59.
  • 60.
  • 61.
  • 62.
  • 63.
  • 64. Different people have different views of the database…these are the external schema The internal schema is the underlying design and implementation Figure 2-7 Three-schema architecture
  • 65. Figure 2-8 Developing the three-tiered architecture
  • 66. Figure 2-9 Three-tiered client/server database architecture
  • 67. Pine Valley Furniture Segment of project data model (Figure 2-11)
  • 68. Figure 2-12 Four relations (Pine Valley Furniture)
  • 69. Figure 2-12 Four relations (Pine Valley Furniture) (cont.)
  • 70. Chapter 3: Modeling Data in the Organization Modern Database Management 8 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred R. McFadden © 2007 by Prentice Hall
  • 71.
  • 72.
  • 73.
  • 74.
  • 75.
  • 76.
  • 77. Sample E-R Diagram (Figure 3-1)
  • 78. Relationship degrees specify number of entity types involved Relationship cardinalities specify how many of each entity type is allowed Basic E-R notation (Figure 3-2) Entity symbols A special entity that is also a relationship Relationship symbols Attribute symbols
  • 79.
  • 80. Inappropriate entities Figure 3-4 Example of inappropriate entities System user System output Appropriate entities
  • 81.
  • 82.
  • 83.
  • 84. Figure 3-7 A composite attribute An attribute broken into component parts Figure 3-8 Entity with multivalued attribute (Skill) and derived attribute (Years_Employed) Multivalued an employee can have more than one skill Derived from date employed and current date
  • 85. Figure 3-9 Simple and composite identifier attributes The identifier is boldfaced and underlined
  • 86. Figure 3-19 Simple example of time-stamping This attribute that is both multivalued and composite
  • 87.
  • 88. Figure 3-10 Relationship types and instances a) Relationship type b) Relationship instances
  • 89.
  • 90. Degree of relationships – from Figure 3-2 Entities of two different types related to each other Entities of three different types related to each other One entity related to another of the same entity type
  • 91.
  • 92.
  • 93. Figure 3-12 Examples of relationships of different degrees a) Unary relationships
  • 94. Figure 3-12 Examples of relationships of different degrees (cont.) b) Binary relationships
  • 95. Figure 3-12 Examples of relationships of different degrees (cont.) c) Ternary relationship Note: a relationship can have attributes of its own
  • 96. Figure 3-17 Examples of cardinality constraints a) Mandatory cardinalities A patient must have recorded at least one history, and can have many A patient history is recorded for one and only one patient
  • 97. Figure 3-17 Examples of cardinality constraints (cont.) b) One optional, one mandatory An employee can be assigned to any number of projects, or may not be assigned to any at all A project must be assigned to at least one employee, and may be assigned to many
  • 98. Figure 3-17 Examples of cardinality constraints (cont.) a) Optional cardinalities A person is is married to at most one other person, or may not be married at all
  • 99. Entities can be related to one another in more than one way Figure 3-21 Examples of multiple relationships a) Employees and departments
  • 100. Figure 3-21 Examples of multiple relationships (cont.) b) Professors and courses (fixed lower limit constraint) Here, min cardinality constraint is 2
  • 101. Figure 3-15a and 3-15b Multivalued attributes can be represented as relationships simple composite
  • 102.
  • 103. Strong entity Weak entity Identifying relationship
  • 104.
  • 105. Figure 3-11a A binary relationship with an attribute Here, the date completed attribute pertains specifically to the employee’s completion of a course…it is an attribute of the relationship
  • 106. Figure 3-11b An associative entity (CERTIFICATE) Associative entity is like a relationship with an attribute, but it is also considered to be an entity in its own right. Note that the many-to-many cardinality between entities in Figure 3-11a has been replaced by two one-to-many relationships with the associative entity.
  • 107. Figure 3-13c An associative entity – bill of materials structure This could just be a relationship with attributes…it’s a judgment call
  • 108. Figure 3-18 Ternary relationship as an associative entity
  • 109. Microsoft Visio Example for E-R diagram Different modeling software tools may have different notation for the same constructs
  • 110. Chapter 4: The Enhanced ER Model and Business Rules Modern Database Management 8 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred R. McFadden © 2007 by Prentice Hall
  • 111.
  • 112.
  • 113. Figure 4-1 Basic notation for supertype/subtype notation a) EER notation
  • 114. Different modeling tools may have different notation for the same modeling constructs b) Microsoft Visio Notation Figure 4-1 Basic notation for supertype/subtype notation (cont.)
  • 115. Figure 4-2 Employee supertype with three subtypes All employee subtypes will have emp nbr, name, address, and date-hired Each employee subtype will also have its own attributes
  • 116.
  • 117. Figure 4-3 Supertype/subtype relationships in a hospital Both outpatients and resident patients are cared for by a responsible physician Only resident patients are assigned to a bed
  • 118.
  • 119. Figure 4-4 Example of generalization a) Three entity types: CAR, TRUCK, and MOTORCYCLE All these types of vehicles have common attributes
  • 120. Figure 4-4 Example of generalization (cont.) So we put the shared attributes in a supertype Note: no subtype for motorcycle, since it has no unique attributes b) Generalization to VEHICLE supertype
  • 121. Figure 4-5 Example of specialization a) Entity type PART Only applies to manufactured parts Applies only to purchased parts
  • 122. b) Specialization to MANUFACTURED PART and PURCHASED PART Created 2 subtypes Figure 4-5 Example of specialization (cont.) Note: multivalued attribute was replaced by an associative entity relationship to another entity
  • 123.
  • 124. Figure 4-6 Examples of completeness constraints a) Total specialization rule A patient must be either an outpatient or a resident patient
  • 125. b) Partial specialization rule Figure 4-6 Examples of completeness constraints (cont.) A vehicle could be a car, a truck, or neither
  • 126.
  • 127. a) Disjoint rule Figure 4-7 Examples of disjointness constraints A patient can either be outpatient or resident, but not both
  • 128. b) Overlap rule Figure 4-7 Examples of disjointness constraints (cont.) A part may be both purchased and manufactured
  • 129.
  • 130. Figure 4-8 Introducing a subtype discriminator ( disjoint rule) A simple attribute with different possible values indicating the subtype
  • 131. Figure 4-9 Subtype discriminator ( overlap rule) A composite attribute with sub-attributes indicating “yes” or “no” to determine whether it is of each subtype
  • 132. Figure 4-10 Example of supertype/subtype hierarchy
  • 133.
  • 134. Figure 4-13a Possible entity clusters for Pine Valley Furniture in Microsoft Visio Related groups of entities could become clusters
  • 135. Figure 4-13b EER diagram of PVF entity clusters More readable, isn’t it?
  • 136. Figure 4-14 Manufacturing entity cluster Detail for a single cluster
  • 137. Chapter 4: The Enhanced ER Model and Business Rules Modern Database Management 8 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred R. McFadden © 2007 by Prentice Hall
  • 138.
  • 139.
  • 140. Figure 4-1 Basic notation for supertype/subtype notation a) EER notation
  • 141. Different modeling tools may have different notation for the same modeling constructs b) Microsoft Visio Notation Figure 4-1 Basic notation for supertype/subtype notation (cont.)
  • 142. Figure 4-2 Employee supertype with three subtypes All employee subtypes will have emp nbr, name, address, and date-hired Each employee subtype will also have its own attributes
  • 143.
  • 144. Figure 4-3 Supertype/subtype relationships in a hospital Both outpatients and resident patients are cared for by a responsible physician Only resident patients are assigned to a bed
  • 145.
  • 146. Figure 4-4 Example of generalization a) Three entity types: CAR, TRUCK, and MOTORCYCLE All these types of vehicles have common attributes
  • 147. Figure 4-4 Example of generalization (cont.) So we put the shared attributes in a supertype Note: no subtype for motorcycle, since it has no unique attributes b) Generalization to VEHICLE supertype
  • 148. Figure 4-5 Example of specialization a) Entity type PART Only applies to manufactured parts Applies only to purchased parts
  • 149. b) Specialization to MANUFACTURED PART and PURCHASED PART Created 2 subtypes Figure 4-5 Example of specialization (cont.) Note: multivalued attribute was replaced by an associative entity relationship to another entity
  • 150.
  • 151. Figure 4-6 Examples of completeness constraints a) Total specialization rule A patient must be either an outpatient or a resident patient
  • 152. b) Partial specialization rule Figure 4-6 Examples of completeness constraints (cont.) A vehicle could be a car, a truck, or neither
  • 153.
  • 154. a) Disjoint rule Figure 4-7 Examples of disjointness constraints A patient can either be outpatient or resident, but not both
  • 155. b) Overlap rule Figure 4-7 Examples of disjointness constraints (cont.) A part may be both purchased and manufactured
  • 156.
  • 157. Figure 4-8 Introducing a subtype discriminator ( disjoint rule) A simple attribute with different possible values indicating the subtype
  • 158. Figure 4-9 Subtype discriminator ( overlap rule) A composite attribute with sub-attributes indicating “yes” or “no” to determine whether it is of each subtype
  • 159. Figure 4-10 Example of supertype/subtype hierarchy
  • 160.
  • 161. Figure 4-13a Possible entity clusters for Pine Valley Furniture in Microsoft Visio Related groups of entities could become clusters
  • 162. Figure 4-13b EER diagram of PVF entity clusters More readable, isn’t it?
  • 163. Figure 4-14 Manufacturing entity cluster Detail for a single cluster
  • 164. Packaged data models provide generic models that can be customized for a particular organization’s business rules
  • 165.
  • 166. Figure 4-18 EER diagram to describe business rules
  • 167.
  • 168.
  • 169. Figure 4-19 Data model segment for class scheduling
  • 170. Figure 4-20 Business Rule 1: For a faculty member to be assigned to teach a section of a course, the faculty member must be qualified to teach the course for which that section is scheduled Action assertion Anchor object Corresponding object Corresponding object In this case, the action assertion is a R estriction
  • 171. Figure 4-21 Business Rule 2: For a faculty member to be assigned to teach a section of a course, the faculty member must not be assigned to teach a total of more than three course sections Action assertion Anchor object Corresponding object In this case, the action assertion is an U pper LIM it
  • 172. Chapter 5: Logical Database Design and the Relational Model Modern Database Management 8 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred R. McFadden © 2007 by Prentice Hall
  • 173.
  • 174.
  • 175.
  • 176.
  • 177. Figure 5-3 Schema for four relations (Pine Valley Furniture Company) Primary Key Foreign Key (implements 1:N relationship between customer and order) Combined, these are a composite primary key (uniquely identifies the order line)…individually they are foreign keys (implement M:N relationship between order and product)
  • 178.
  • 179. Domain definitions enforce domain integrity constraints
  • 180.
  • 181. Figure 5-5 Referential integrity constraints (Pine Valley Furniture) Referential integrity constraints are drawn via arrows from dependent to parent table
  • 182. Figure 5-6 SQL table definitions Referential integrity constraints are implemented with foreign key to primary key references
  • 183.
  • 184. (a) CUSTOMER entity type with simple attributes Figure 5-8 Mapping a regular entity (b) CUSTOMER relation
  • 185. (a) CUSTOMER entity type with composite attribute Figure 5-9 Mapping a composite attribute (b) CUSTOMER relation with address detail
  • 186. Figure 5-10 Mapping an entity with a multivalued attribute One–to–many relationship between original entity and new relation (a) Multivalued attribute becomes a separate relation with foreign key (b)
  • 187.
  • 188. Figure 5-11 Example of mapping a weak entity a) Weak entity DEPENDENT
  • 189. NOTE: the domain constraint for the foreign key should NOT allow null value if DEPENDENT is a weak entity Foreign key Figure 5-11 Example of mapping a weak entity (cont.) b) Relations resulting from weak entity Composite primary key
  • 190.
  • 191. Figure 5-12 Example of mapping a 1:M relationship a) Relationship between customers and orders Note the mandatory one Again, no null value in the foreign key…this is because of the mandatory minimum cardinality Foreign key b) Mapping the relationship
  • 192. Figure 5-13 Example of mapping an M:N relationship a) Completes relationship (M:N) The Completes relationship will need to become a separate relation
  • 193. New intersection relation Figure 5-13 Example of mapping an M:N relationship (cont.) b) Three resulting relations Foreign key Foreign key Composite primary key
  • 194. Figure 5-14 Example of mapping a binary 1:1 relationship a) In_charge relationship (1:1) Often in 1:1 relationships, one direction is optional.
  • 195. b) Resulting relations Figure 5-14 Example of mapping a binary 1:1 relationship (cont.) Foreign key goes in the relation on the optional side, Matching the primary key on the mandatory side
  • 196.
  • 197. Figure 5-15 Example of mapping an associative entity a) An associative entity
  • 198. Figure 5-15 Example of mapping an associative entity (cont.) b) Three resulting relations Composite primary key formed from the two foreign keys
  • 199. Figure 5-16 Example of mapping an associative entity with an identifier a) SHIPMENT associative entity
  • 200. Figure 5-16 Example of mapping an associative entity with an identifier (cont.) b) Three resulting relations Primary key differs from foreign keys
  • 201.
  • 202. Figure 5-17 Mapping a unary 1:N relationship (a) EMPLOYEE entity with unary relationship (b) EMPLOYEE relation with recursive foreign key
  • 203. Figure 5-18 Mapping a unary M:N relationship (a) Bill-of-materials relationships (M:N) (b) ITEM and COMPONENT relations
  • 204.
  • 205. Figure 5-19 Mapping a ternary relationship a) PATIENT TREATMENT Ternary relationship with associative entity
  • 206. b) Mapping the ternary relationship PATIENT TREATMENT Remember that the primary key MUST be unique Figure 5-19 Mapping a ternary relationship (cont.) This is why treatment date and time are included in the composite primary key But this makes a very cumbersome key… It would be better to create a surrogate key like Treatment#
  • 207.
  • 209. Figure 5-21 Mapping Supertype/subtype relationships to relations These are implemented as one-to-one relationships
  • 210.
  • 211.
  • 212. Example–Figure 5-2b Question–Is this a relation? Answer–Yes: Unique rows and no multivalued attributes Question–What’s the primary key? Answer–Composite: Emp_ID, Course_Title
  • 213.
  • 214.
  • 215. Figure 5.22 Steps in normalization
  • 216.
  • 217. Table with multivalued attributes, not in 1 st normal form Note: this is NOT a relation
  • 218. Table with no multivalued attributes and unique rows, in 1 st normal form Note: this is relation, but not a well-structured one
  • 219.
  • 220.
  • 221. Order_ID  Order_Date, Customer_ID, Customer_Name, Customer_Address Therefore, NOT in 2 nd Normal Form Customer_ID  Customer_Name, Customer_Address Product_ID  Product_Description, Product_Finish, Unit_Price Order_ID, Product_ID  Order_Quantity Figure 5-27 Functional dependency diagram for INVOICE
  • 222. Partial dependencies are removed, but there are still transitive dependencies Getting it into Second Normal Form Figure 5-28 Removing partial dependencies
  • 223.
  • 224. Transitive dependencies are removed Figure 5-28 Removing partial dependencies Getting it into Third Normal Form
  • 225.
  • 226.
  • 227. Figure 5-31 Enterprise keys a) Relations with enterprise key b) Sample data with enterprise key
  • 228. Chapter 6: Physical Database Design and Performance Modern Database Management 8 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred R. McFadden © 2007 by Prentice Hall
  • 229.
  • 230.
  • 231.
  • 232. Figure 6-1 Composite usage map (Pine Valley Furniture Company)
  • 233. Figure 6-1 Composite usage map (Pine Valley Furniture Company) (cont.) Data volumes
  • 234. Figure 6-1 Composite usage map (Pine Valley Furniture Company) (cont.) Access Frequencies (per hour)
  • 235. Figure 6-1 Composite usage map (Pine Valley Furniture Company) (cont.) Usage analysis: 140 purchased parts accessed per hour  80 quotations accessed from these 140 purchased part accesses  70 suppliers accessed from these 80 quotation accesses
  • 236. Figure 6-1 Composite usage map (Pine Valley Furniture Company) (cont.) Usage analysis: 75 suppliers accessed per hour  40 quotations accessed from these 75 supplier accesses  40 purchased parts accessed from these 40 quotation accesses
  • 237.
  • 238.
  • 239. Figure 6-2 Example code look-up table (Pine Valley Furniture Company) Code saves space, but costs an additional lookup to obtain actual value
  • 240.
  • 241.
  • 242.
  • 243.
  • 244. Figure 6-3 A possible denormalization situation: two entities with one-to-one relationship
  • 245. Figure 6-4 A possible denormalization situation: a many-to-many relationship with nonkey attributes Extra table access required Null description possible
  • 246. Figure 6-5 A possible denormalization situation: reference data Extra table access required Data duplication
  • 247.
  • 248.
  • 249.
  • 250.
  • 251. Figure 6-4 Physical file terminology in an Oracle environment
  • 252.
  • 253. Figure 6-7a Sequential file organization If not sorted Average time to find desired record = n/2 1 2 n Records of the file are stored in sequence by the primary key field values If sorted – every insert or delete requires resort
  • 254.
  • 255. Figure 6-7b B-tree index uses a tree search Average time to find desired record = depth of the tree Leaves of the tree are all at same level  consistent access time
  • 256. Figure 6-7c Hashed file or index organization Hash algorithm Usually uses division-remainder to determine record position. Records with same position are grouped in lists
  • 257. Figure 6-8 Bitmap index index organization Bitmap saves on space requirements Rows - possible values of the attribute Columns - table rows Bit indicates whether the attribute of a row has the values
  • 258. Figure 6-9 Join Indexes–speeds up join operations
  • 259.
  • 260.
  • 261.
  • 262.
  • 263.
  • 264.
  • 265.
  • 266. Database Architectures (Figure 6-11) Legacy Systems Current Technology Data Warehouses
  • 267. Chapter 7: Introduction to SQL Modern Database Management 8 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred R. McFadden © 2007 by Prentice Hall
  • 268.
  • 269.
  • 270.
  • 271.
  • 272.
  • 273.
  • 274. Figure 7-1 A simplified schematic of a typical SQL environment, as described by the SQL-2003 standard
  • 275. Some SQL Data types
  • 276. Figure 7-4 DDL, DML, DCL, and the database development process
  • 277.
  • 278.
  • 279. The following slides create tables for this enterprise data model
  • 280. Figure 7-6 SQL database definition commands for Pine Valley Furniture Overall table definitions
  • 281. Defining attributes and their data types
  • 282. Non-nullable specification Identifying primary key Primary keys can never have NULL values
  • 283. Non-nullable specifications Primary key Some primary keys are composite– composed of multiple attributes
  • 284. Default value Domain constraint Controlling the values in attributes
  • 285. Primary key of parent table Identifying foreign keys and establishing relationships Foreign key of dependent table
  • 286.
  • 287. Relational integrity is enforced via the primary-key to foreign-key match Figure 7-7 Ensuring data integrity through updates
  • 288.
  • 289.
  • 290.
  • 291.
  • 292.
  • 293.
  • 294. Merge Statement Makes it easier to update a table…allows combination of Insert and Update in one statement Useful for updating master tables with new data
  • 295.
  • 296.
  • 297.
  • 298.
  • 299.
  • 300.
  • 301. Venn Diagram from Previous Query
  • 302.
  • 303.
  • 304.
  • 305.
  • 306.
  • 307.
  • 308.
  • 309. Chapter 8: Advanced SQL Modern Database Management 8 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred R. McFadden © 2007 by Prentice Hall
  • 310.
  • 311.
  • 312. The following slides create tables for this enterprise data model
  • 313. These tables are used in queries that follow Figure 8-1 Pine Valley Furniture Company Customer and Order tables with pointers from customers to their orders
  • 314.
  • 315.
  • 316. Results Unlike INNER join, this will include customer rows with no matching order rows
  • 317.
  • 318. Figure 8-2 Results from a four-table join From CUSTOMER_T table From ORDER_T table From PRODUCT_T table
  • 319.
  • 320.
  • 321.
  • 322.
  • 323.
  • 324. Figure 8-3b Processing a correlated subquery Subquery refers to outer-query data, so executes once for each row of outer query Note: only the orders that involve products with Natural Ash will be included in the final results
  • 325.
  • 326.
  • 327.
  • 328.
  • 329. Figure 8-5 An SQL Transaction sequence (in pseudocode)
  • 330.
  • 331.
  • 332.
  • 333.
  • 334. Figure 8-6 Triggers contrasted with stored procedures Procedures are called explicitly Triggers are event-driven Source : adapted from Mullins, 1995.
  • 335. Figure 8-7 Simplified trigger syntax, SQL:2003 Figure 8-8 Create routine syntax, SQL:2003
  • 336.
  • 337. Chapter 9: The Client/Server Database Environment Modern Database Management 8 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred R. McFadden © 2007 by Prentice Hall
  • 338.
  • 339.
  • 340.

Editor's Notes

  1. 2
  2. 3
  3. 8
  4. 5
  5. 6
  6. 7
  7. 12
  8. 14
  9. 37
  10. 17
  11. 16
  12. 8
  13. 29
  14. 22
  15. 22
  16. 22
  17. 1
  18. 1
  19. 1
  20. 40
  21. 40
  22. 20
  23. 21
  24. 27
  25. 36