Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 3-1 Ch. 3 –Data Modeling Designing an efficient and effective database that meets users’ needs.

Similar presentations


Presentation on theme: "Chapter 3-1 Ch. 3 –Data Modeling Designing an efficient and effective database that meets users’ needs."— Presentation transcript:

1 Chapter 3-1 Ch. 3 –Data Modeling Designing an efficient and effective database that meets users’ needs

2 Chapter 3-2 What is a Database? Collection of organized data Used by many different computer applications Manipulated by database management systems or DBMS (e.g. MS Access)

3 Chapter 3-3 Significance of a Database Critical and valuable part of every business Growing volume of data and cost of storage Distributed vs. centralized data processing/ storage Security and privacy of data Irreplaceable data and redundant backup Need for accuracy (costs 10 times as much to fix problems created from inaccurate data as it does to get it right the first time) Increasing internet connectivity with databases Amazon has 7 data centers requiring 1 sq. mile, 18 football fields, 454k servers

4 Chapter 3-4 Data must be stored and organized systematically Three important concepts:  Data hierarchy  Record structures  Database keys Storing Data in Databases

5 Chapter 3-5 Data Hierarchy Data hierarchy -ascending order:  Bit (binary digit, e.g. 0 for light off and 1 for light on)  Byte (eight bits traditionally needed to form one character, such as a letter or digit)  Data field (several bytes, e.g. word or number)  Record (set of data fields)  File (set of records)  Database (collection of files) E.g. How would the computer store A2? Bytes Value 1000kkilo 1000 2 Mmega 1000 3 Ggiga 1000 4 Ttera 1000 5 Ppeta 1000 6 Eexa 1000 7 Zzetta 1000 8 Yyotta Binary:000000000000000100000010000000110000010000000101000001100000011100001000000010010000101000001011 Hexadecimal:0123456789AB

6 Chapter 3-6 Record Structures Data fields in each record are usually pre- formatted for numbers, text, etc. Example

7 Chapter 3-7 Data Dictionary Example

8 Chapter 3-8 Record Keys Primary Record Key  Unique to each record. Generally, a person’s name is not a good primary key because several people with the same name might exist Foreign Keys  Enables records to have a common reference in multiple files

9 Chapter 3-9 Creating a Database On the same day, a firm pays cash for a paper clip and hires a new CEO. Traditionally an AIS only captured economic events that affected resources (e.g. buying the paper clip but not hiring the CEO). Modern databases need to capture resources, events, and agents (REA). Resources: Assets (e.g. cash, inventory, equipment, etc.) Events: business activities divided into economic (or accounting) events, such as buying a paper clip, and business events, such as registering a student, or a student’s birthday Agents: people associated with events, including both internal (employee) and external (customers) According to the late, great Peter Drucker (father of modern management theory and Claremont business program). “People usually consider accounting to be financial. But that is valid only for the part, going back 700 years, that deals with assets, liabilities, and cash flows; it is only a small part of modern accounting. Indeed, accounting today deals with operations... money is simply a notation and the language in which to express nonmonetary events”. Do you agree?

10 Chapter 3-10 Entity Examples

11 Chapter 3-11 Normalization Most data organized in flat files  No sequence or order  Difficult to find records  Inefficient and redundant data Normalization  Process of examining and arranging file data  Allows for more efficient use of data and smaller data files (eliminates redundancy)  Avoid problems in accessing and modifying data (e.g. entering the same information into two separate tables magnifies errors and inefficiency)

12 Chapter 3-12 Unnormalized Data

13 Chapter 3-13 First Normal Form In First Normal Form (1 NF) when:  All data fields are well defined  Data can be stored in a flat file Problems  Data redundancy  Insertion anomaly  Deletion anomaly Also known as First Norm

14 Chapter 3-14 First Normal Form Example

15 Chapter 3-15 Second Normal Form Second Normal Form (2 NF) achieved when:  It is in 1 NF  All data items depend on primary record key Benefits  More efficient design  Eliminates data redundancy Also known as Second Norm

16 Chapter 3-16 Second Normal Form Example

17 Chapter 3-17 Third Normal Form Third Normal Form (3 NF) achieved when:  It is in 2 NF  Does not contain transitive dependencies  Data field A does not determine data field B Ultimate Goal  Create database in 3 NF Also known as Third Norm

18 Chapter 3-18 Third Normal Form Example

19 Chapter 3-19 Cardinality Relationships Notations (N = No limit)  One-to-one (1:1); None-to-one (0:1); One-to-many (1:N) ; Many-to-many (N:N), etc. Determine which of the following cardinalities may be appropriate for each situation below (1,1), (1,N), (1,0), (0,N), (0,1), (N,1), (N,0) or (N,N): (1) Soc. Sec. # and name (2) Invoice # and a customer # (3) A customer and sales rep (4) A debit card and PIN (5) A parking ticket# and student ID# (6) a faculty member and course

20 Chapter 3-20 Relationship Tables Provide greater flexibility Need for Relationship Tables  Linking tables with foreign keys  Many-to-many relationships

21 Chapter 3-21 Relationship Database – tables linked by key


Download ppt "Chapter 3-1 Ch. 3 –Data Modeling Designing an efficient and effective database that meets users’ needs."

Similar presentations


Ads by Google