Concepts of Database Management, Fifth Edition Chapter 1: Introduction to Database Management Objectives Introduce Premiere Products, the company that is used as the basis for many of the examples throughout the text Introduce Describe basic database terminology database management systems Explain the advantages and disadvantages of database processing Introduce Henry Books, the company that is used in the case that runs throughout the text Concepts of Database Management, 5th Edition 2 Premiere Products Distributor of appliances, housewares, and sporting goods Uses spreadsheet software to maintain important data Recent growth has made spreadsheet approach problematic Concepts of Database Management, 5th Edition 3 Figure 1.1: Sample Orders Spreadsheet Concepts of Database Management, 5th Edition 4 Problems Using Spreadsheet Redundancy z Duplication of data or the storing of the same data in more than one place z Occurs when the same information is stored in more than one place Difficulty Limited Size accessing data security limitations Concepts of Database Management, 5th Edition 5 Premiere Products Required Information Sales z Reps Sales rep number, last name, first name, address, total commission, commission rate Customers z Customer number, name, address, current balance, credit limit, customer sales rep Parts z Inventory Part number, description, number units on hand, item class, warehouse number, unit price Concepts of Database Management, 5th Edition 6 Figure 1.2: Premiere Products Sample Order Concepts of Database Management, 5th Edition 7 Premiere Products Customer Order Order z Order number, order date, customer number Order z line Order number, part number, number units ordered, unit price Overall z order total Not stored since it can be calculated Concepts of Database Management, 5th Edition 8 Database Background Database z Structure that can store information about Multiple types of entities Attributes of those entities Relationships among entities Entity z Person, place, thing, or event z Premiere Products has sales reps, customers, orders, and parts Concepts of Database Management, 5th Edition 9 Database Background (con’t) Attribute z Property of an entity z Customer has name, street, city, et cetera z May also be called a field or column Concepts of Database Management, 5th Edition 10 Figure 1.3: Entities and Attributes Concepts of Database Management, 5th Edition 11 Database Background (con’t.) Relationship z Association between entities z One-to-many relationship - rep is related to many customers z Customer is related to a single rep Data file z File used to store data z Computer counterpart to ordinary paper file Concepts of Database Management, 5th Edition 12 Figure 1.4: One-to-Many Relationship Concepts of Database Management, 5th Edition 13 Figure 1.5: Rep and Customer Tables Concepts of Database Management, 5th Edition 14 Figure 1.5: Orders and OrderLine Tables (con’t.) Concepts of Database Management, 5th Edition 15 Figure 1.5: Part Table (con’t.) Concepts of Database Management, 5th Edition 16 Figure 1.6: Alternative Orders Table Concepts of Database Management, 5th Edition 17 Entity-relationship Diagram Visual way to represent a database z Rectangles represent entities z Lines represent relationships between connected entities Concepts of Database Management, 5th Edition 18 Figure 1.7: E-R Diagram Concepts of Database Management, 5th Edition 19 Database Management Systems Program(s) through which users interact with database Popular DBMSs include z Access z Oracle z DB2 z SQL Server Premiere Products decides to use Access Concepts of Database Management, 5th Edition 20 Figure 1.8 and 1.9: Using DBMSs in Different Ways Concepts of Database Management, 5th Edition 21 Building a Database Database design determines the structure of a database Design entered into DBMS during construction z Tables – stores data z Forms – screen objects used to maintain, view, and print from a database z Reports – provides formatted output z Switchboards – a set of special forms used to provide controlled access to the data, forms, report and other objects in a database Concepts of Database Management, 5th Edition 22 Figures 1.10 and 1.11: Part and Order Forms Concepts of Database Management, 5th Edition 23 Figure 1.12: Parts Report Concepts of Database Management, 5th Edition 24 Figure 1.13: Main Switchboard Concepts of Database Management, 5th Edition 25 Figure 1.14: Main Data Switchboard Concepts of Database Management, 5th Edition 26 Figure 1.15: Advantages of Database Processing Concepts of Database Management, 5th Edition 27 Figure 1.16: Disadvantages of Database Processing Concepts of Database Management, 5th Edition 28 Introduction to Henry Books Database Case Book store chain operated by Ray Henry Henry decided to use database to gather and store information on: z Branches z Publishers z Authors z Books Concepts of Database Management, 5th Edition 29 Figure 1.17: Sample Branch Data Concepts of Database Management, 5th Edition 30 Figure 1.17: Sample Publisher Data (con’t.) Concepts of Database Management, 5th Edition 31 Figure 1.18: Sample Author Data Concepts of Database Management, 5th Edition 32 Figure 1.19: Sample Book Data Concepts of Database Management, 5th Edition 33 Figure 1.20: Wrote Table Relates Authors to Books Concepts of Database Management, 5th Edition 34 Figure 1.20: Inventory Table Relates Branches to Books (con’t.) Concepts of Database Management, 5th Edition 35 Summary Nondatabase approaches to management have problems with replication, redundancy, sharing, limited security, and size limitations Entity - a person, place, object, event, or idea for which you want to store and process data Attribute, field, or column - a characteristic or property of an entity Relationship - an association between entities Concepts of Database Management, 5th Edition 36 Summary One-to-many relationship - exists when Each occurrence of the first entity is related to many occurrences of the second entity z Each occurrence of the second entity is related to only one occurrence of the first entity z Database is a structure that can store information about multiple types of entities An entity-relationship (E-R) diagram represents a database pictorially Database management system (DBMS) - a program, or a collection of programs, through which users interact with a database Concepts of Database Management, 5th Edition 37 Summary Advantages to database processing: Getting more information from the same amount of data z Sharing data z Balancing conflicting requirements z Controlling redundancy z Facilitating consistency z Improving integrity z Expanding security z Increasing productivity z Providing data independence z Concepts of Database Management, 5th Edition 38 Summary Disadvantages of database processing: z Larger file size z Increased complexity z Greater impact of failure z More difficult recovery Concepts of Database Management, 5th Edition 39