Prepared by Paula Funkhouser University of Nevada, Reno Core Concepts of Accounting Information Systems, 13th Edition Mark G Simkin ● Jacob M Rose ● Carolyn S Norman Database Design Chapter Chapter 7: Database Design • Introduction • An Overview of Databases • Steps in Developing a Database Using Resources, Events and Agents Approach • Normalization Copyright © 2015 John Wiley & Sons, Inc All rights reserved Introduction • Uses of a modern AIS – Systematically record data – Provide convenient and useful formats – Easy access to information Copyright © 2015 John Wiley & Sons, Inc All rights reserved What is a Database? • Collection of organized data • Used by many different computer applications • Manipulated by database management systems (DBMS) Copyright © 2015 John Wiley & Sons, Inc All rights reserved Significance of a Database Critical information Volume Distribution Privacy Irreplaceable data Need for accuracy Copyright © 2015 John Wiley & Sons, Inc All rights reserved Significance of a Database • Internet uses • Big Data • Storing Data in Databases • Data Hierarchy Copyright © 2015 John Wiley & Sons, Inc All rights reserved Storing Data in Databases Data must be stored and organized systematically Three important concepts: Three important concepts Data hierarchy Record structures Database keys Copyright © 2015 John Wiley & Sons, Inc All rights reserved Data Hierarchy • Data organization in ascending order: – Data field – Record – File – Database Copyright © 2015 John Wiley & Sons, Inc All rights reserved Record Structures • Data fields in each record of a database table • Structure is usually fixed • Example Copyright © 2015 John Wiley & Sons, Inc All rights reserved Database Keys • Primary Key – Unique to each record • Foreign Keys – Enable referencing of one or more records – Matches primary key of related table 10 Copyright © 2015 John Wiley & Sons, Inc All rights reserved E-R Diagram Example 27 Copyright © 2015 John Wiley & Sons, Inc All rights reserved Relationship Tables • Provide greater flexibility • Need for Relationship Tables Linking tables with foreign keys Many-to-many relationships 28 Copyright © 2015 John Wiley & Sons, Inc All rights reserved Relationship Tables 29 Copyright © 2015 John Wiley & Sons, Inc All rights reserved Schematic of Database Tables 30 Copyright © 2015 John Wiley & Sons, Inc All rights reserved Study Break #3 In the REA model, the “A” stands for: A B C D Agents Additions Accounts Associations 31 Copyright © 2015 John Wiley & Sons, Inc All rights reserved Study Break #4 Which of these is not a cardinality between two database entries? A B C D One-to-one None-to-none One-to-many Many-to-many 32 Copyright © 2015 John Wiley & Sons, Inc All rights reserved Normalization • Normalization – Methodology ensuring attributes are stored in most appropriate tables – Design promotes accuracy – Avoids redundancy of data storage • Levels – First normal form – Second normal form – Third normal form 33 Copyright © 2015 John Wiley & Sons, Inc All rights reserved Unnormalized Data 34 Copyright © 2015 John Wiley & Sons, Inc All rights reserved First Normal Form • In First Normal Form (1 NF) when: – All data fields are singular – Each attribute has one value • Problems – Data redundancy – Insertion anomaly – Deletion anomaly 35 Copyright © 2015 John Wiley & Sons, Inc All rights reserved First Normal Form Example 36 Copyright © 2015 John Wiley & Sons, Inc All rights reserved Second Normal Form • In Second Normal Form (2 NF) when: – It is in NF – All data items depend on primary record key • Benefits – More efficient design – Eliminates data redundancy 37 Copyright © 2015 John Wiley & Sons, Inc All rights reserved Second Normal Form Example 38 Copyright © 2015 John Wiley & Sons, Inc All rights reserved Third Normal Form • In Third Normal Form (3 NF) when: – It is in NF – Does not contain transitive dependencies – Data field A does not determine data field B • Ultimate Goal – Create database in NF 39 Copyright © 2015 John Wiley & Sons, Inc All rights reserved Third Normal Form Example 40 Copyright © 2015 John Wiley & Sons, Inc All rights reserved Study Break #5 A database is in third normal form (3 NF) if it is second normal form and: A All the data attributes in a record are well-defined B All the data attributes in a record depend on the record C The data contains no transitive dependencies D The data can be stored in two or more separate tables key 41 Copyright © 2015 John Wiley & Sons, Inc All rights reserved ... rights reserved What is a Database? • Collection of organized data • Used by many different computer applications • Manipulated by database management systems (DBMS) Copyright © 2015 John Wiley &... Significance of a Database Critical information Volume Distribution Privacy Irreplaceable data Need for accuracy Copyright © 2015 John Wiley & Sons, Inc All rights reserved Significance of a Database... Study Break #2 Within the context of databases, the term “concurrency” refers to the possibility that: A A customer of one store might also be a customer of another store B Two database users