Presentation is loading. Please wait.

Presentation is loading. Please wait.

IS 630 : Accounting Information Systems Relational Databases & Data Modeling with ERD Lecture 4.

Similar presentations


Presentation on theme: "IS 630 : Accounting Information Systems Relational Databases & Data Modeling with ERD Lecture 4."— Presentation transcript:

1 IS 630 : Accounting Information Systems http://www.csun.edu/~dn58412/IS530/IS530_F15.htm Relational Databases & Data Modeling with ERD Lecture 4

2 Learning Objectives  Limitations of traditional application approaches to managing data.  Advantages of centralized database approach  REAL framework to capture relevant business data  Data Modeling with Entity-Relationship Diagrams (ERD)  Advanced database applications in decision support and knowledge management. IS 530 : Lecture 42

3 Why Databases ?  Business information systems are built on databases of business event data.  Accounting information is one of many outputs, of business event data.  Larger organizations store information in data warehouses in ways that let managers analyze it to gain important insights.  Sophisticated reporting systems, based on data warehouses and business event databases, help managers makes better decisions. IS 530 : Lecture 43

4 Application Approach To Business Event Processing IS 530 : Lecture 44

5 Database Approach To Business Event Processing IS 530 : Lecture 45

6 6 Difficulties of Non-Relational Data Files  Update Anomaly: not changing all occurrence of a data item (in many places)  Insert Anomaly: add an invalid (null record) to the database  Delete Anomaly: not remove all info (in many places) about a deleted record

7 Difficulties with Applications Approach  Each application collects and manages its own data in dedicated, separate, physically distinguishable files.  Data redundancy leads to inconsistencies / integrities among the same data in different files.  Increased costs to store multiple versions of the same data in different files.  Data residing in separate files are not shareable because fixed record layout in data files created for a particular application. IS 530 : Lecture 47

8 Centralized Database Approach  Facts about events are stored in relational database tables instead of separate files.  Improves efficiency, eliminates data redundancies, and improves data integrity.  Enables integrated business information systems that include data about all of a company’s operations.  Multiple users from throughout the organization can view and aggregate event data in a manner most conducive to their needs. IS 530 : Lecture 48

9 Database Management Systems  Database management systems (DBMS): set of integrated programs designed to simplify the tasks of creating, accessing, and managing a centralized database.  Integrates a collection of files that are independent of application programs and are available to satisfy a number of different processing needs.  Supports normal data processing needs and provides data useful to managers. IS 530 : Lecture 49

10 Key DBMS Concepts  Data independence : data from the system applications is decoupled to make it independent of the application or other users.  Three-tier architecture : presentation (user interface), logic (applications), and data (database).  Query language : a programming language to create and access a database and to produce inquiry reports.  SQL (Structured Query Language) : standard for DBMS query languages. IS 530 : Lecture 410

11 Advantages of DBMS  Eliminating data redundancy  Ease of maintenance  Reduced labor and storage costs  Data integrity  Data independence  Privacy IS 530 : Lecture 411

12 Disadvantages of DBMS  Expensive to implement.  Expertise needed  If the DBMS fails, all the organization’s information processing halts.  Increased potential for damage with unauthorized access to central location.  Database recovery and contingency planning are more important than in the applications approach. IS 530 : Lecture 412

13 Disadvantages of DBMS...  “Contention” or “concurrency” problems when more than one user attempts to access data at the same time.  Territorial disputes over “data ownership” who is responsible for data maintenance.  CIO and/or a database administrator function needed to deal with these and other problems. IS 530 : Lecture 413

14 IS 530 : Lecture 414 Evolution of Database Systems  File Management (Flat File) Systems  Hierarchical Databases  Network Databases  Relational Databases  Object-Oriented Databases  Data Warehouse

15 IS 530 : Lecture 415 EMPLOYEE UPDATE PROGRAM FD EMPLOYEE MASTER FILE EMPLOYEE REPORT PROGRAM FD CHECK-WRITING PROGRAM FD TIMECARD FILE File Management Systems

16 IS 530 : Lecture 416 Car EngineBodyChassis Left Door Right Door Hood Roof HandleWindowLock Hierarchical Databases

17 Hierarchical Database Model  Hierarchical database model: Records are organized in a pyramid structure.  Child records: records that are included in a record at one level above them (a parent record). May only have one parent record. Link through “pointers”  Parent records: include the lower-level child records.  Cannot sustain complex data structures. IS 530 : Lecture 417

18 IS 530 : Lecture 418 Acme Mfg. First Corp. Size 4 Widget 4D Bolt #11231#11232#11233#11234#11235 CUSTOMERSPRODUCTS ORDERS Network Databases

19 Network Database Model  Network database model: child records can have more than one parent record.  Overcomes problems of hierarchical model.  Eclipsed by relational databases. IS 530 : Lecture 419

20 IS 530 : Lecture 420 CUSTOMERSPRODUCTS ORDERS CUST ID PRODUCT ID ORDER # 1 1 QUANTITY M M Relational Databases

21 Relational Database Model  Relational database model: data are logically organized into two dimensional tables (i.e., “relations”).  Improvement over hierarchical or network database models.  Able to handle complex queries (info from many tables/files.)  Allows only text and numerical data to be stored. Does not allow the inclusion of complex object types such as graphics, audio, video, or geographic information. IS 530 : Lecture 421

22 IS 530 : Lecture 422 CUSTOMERS Add Customer Drop Customer Change Customer PRODUCTS CUST ID CUST NAME ADDRESS PRODUCT ID PRICE QTY-ON HAND New Product Buy Product Sell Product ORDERS ORDER # CUST ID PRODUCT ID QUANTITY Take Order Update Order 11 * * Object-Oriented Databases

23 Object-Oriented Database Model  Object oriented database model: allows the storage of both simple and complex objects.  An object can store attributes and instructions for actions (methods) that can be performed on the object or its attributes. It is a complete “application with its own data”  Object is reusable.  Object-relational databases: includes a relational DBMS framework with the capability to store complex data types. IS 530 : Lecture 423

24 IS 530 : Lecture 424 Data Warehouse

25 What Info to keep ?  REAL Framework R esources E vents A gents L ocations IS 530 : Lecture 425

26 A Model of Business Event What happened? When did it happen? Who was involved? What Resources were involved? Where did it occur? Business Event Internal Agents Location External Agents Resources 26IS 530 : Lecture 4

27 REAL framework Resource Internal Agent External Agent External Agent Location Event 1 Internal Agent Resource Event 2 Location External Agent External Agent IS 530 : Lecture 4

28 REAL Model for Retailing Business Sell Merchandise Receive Customer Payment Receive Customer Payment Merchandise Cash Counter Salesperson Customer IS 530 : Lecture 4 28

29 Entities  Entity is a group of attributes corresponding to the same conceptual thing about which we need to capture and store data (in a file/table )  Entity is a set of instances / members of the object that it represents ( records )  Entity must have a unique name, unique identifier, and at least one attribute (the identifier itself is sufficient) IS 530 : Lecture 4 29

30 Entities : Attributes  An attribute is a descriptive property or characteristic of interest of an entity. Also called field. The data type for an attribute defines what type of data can be stored in that attribute. The domain of an attribute defines what values an attribute can legitimately take on. The default value for an attribute is the value that will be recorded if not specified by the user. IS 530 : Lecture 4 30

31 Entities : Identification  A key is an attribute, or a group of attributes, that assumes a unique value for each entity member (Student ID, SSN, Driver License). Why First Name, Last Name are NOT valid keys ?  A group of attributes that uniquely identifies a member of an entity is called a composite key. 31IS 530 : Lecture 4

32 Alternative ERD Notation Entity 1 Attribute 1Attribute 2 Attribute 3 Attribute 4Attribute 5 Entity 2 Attribute 1 Attribute 2 Attribute 3Attribute 4 IS 530 : Lecture 4 32 1N

33 ENTITY NAME - entity id - attribute 1 - attribute 2 - ………….. - attribute n CUSTOMER - Customer_ID - Cust_Name - Cust_Address - Cust_Phone Entities... IS 530 : Lecture 433

34 Relationships: Degree  Degree of Relationship defines how many entities are involved in a relationship (according to a business rule): Recursive (Unary), Binary, Ternary May carry specific data on the relationship IS 530 : Lecture 4 34

35 Relationships: Degree...  Recursive Relationship : members in the same entity have relationship with each other (one another) STUDENT -StudendID -StudentName Be Friend INDIVIDUAL -ID -Name Marry Date IS 530 : Lecture 4 35

36 Relationships : Degree...  Binary Relationship EMPLOYEE - Emp_ID - Emp_Name - Emp_Title PROJECT - Project_ID - Proj_Name - Proj_Due Lead Date IS 530 : Lecture 4 36

37 Relationships : Degree...  Ternary relationship EMPLOYEE - EmpID - Emp_Name - Emp_Title TASK - TaskID - TaskName Assign Date PROJECT - ProjectID - Proj_Name - Proj_Due IS 530 : Lecture 4 37

38 Relationships: Cardinalities  Cardinalities document how many members of one entity can relate to a single member of another entity in a relationship. Max / Min number of members Reflect business policies or general business practices (e.g., how many classes a student can take; how many students a class can hold). StudentClassEnroll (16, 37)(1, 5) IS 530 : Lecture 4 38

39 Max Cardinalities SalesPay Cash Collections One-to-One (1:1) (Binary) Relationship One-to-Many (1:M) (Binary) Relationship Ex: Cash Sales Sales Cash Collections Pay Ex: Installment Payments IS 530 : Lecture 439

40 Max Cardinalities... SalesPay Cash Collections Many-to-One (M:1) (Binary) Relationship Many-to-Many (M:N) (Binary) Relationship Ex: Pay many credit purchases in full Sales Cash Collections Pay Ex: Pay credit purchases with partial payments over some months IS 530 : Lecture 440

41 Data Modeling & DB Design  Data Modeling: what info do we need to keep and how they relate to one another  Database Design: tables must be organized with few or no redundancies (Normalization)  Keys in Relational DB Primary key : for identification (Student ID) Combination primary key (Composite key) Foreign key: to link one table to another. Surrogate key : a single-value key as alternate to Composite key) [ Secondary key : for grouping (major, gender)] [Candidate key : alternative attribute could be used as identifier (SSN, Driver License)] IS 530 : Lecture 4 41

42 Database Design  Relational Data Model (Data Schema) Primary key (PK): for record identification (Customer ID), (Order ID) Foreign key (FK): for 1:M relationship, on M-side (Orders) links to 1-side (the Customer who places Orders) Associative Table (Junction table) with Composite Key (CK) for M:N relationships IS 530 : Lecture 4 42

43 Foreign Keys in Relational Database  A foreign key (FK) in Entity E1(CustID in ORDER) is a primary key of another Entity E2 (CustID in CUSTOMER), which is used to identify (link) a 1:M relationship between E1 and E2 (CUSTOMER and ORDER).  Foreign key is made on the many side (CUSTOMER has many ORDERS, therefore ORDER carries CustID as FK to show which Customer places that Order) IS 530 : Lecture 4 43

44 IS 530 : Lecture 444 CUSTOMERORDER CUSTOMER CustomerID ORDER OrderID CustomerID Primary Key Foreign Key 1:M Relationship Foreign Key

45 Foreign Keys in Relational Database...  In M:N relationship, the associative/junction table with a composite key will be used to capture the relationship. ORDER involved many PRODUCTS, PRODUCT involved in many ORDERS. Composite key ProductID-OrderID for LINE ITEM to indicate which product involves in which sales  Each part of the composite key serves like a foreign key.  Sometimes, a “surrogate” key (RecordNo) is used as primary key to simplify the identification of record. IS 530 : Lecture 4 45

46 IS 530 : Lecture 446 ORDERPRODUCT LINE_ITEM RecordNo OrderID ProductID ORDER OrderID Primary Key M:N Relationship PRODUCT ProductID Composite Key JUNCTION TABLE Composite Key

47 Database Integrity  Entity integrity: An identifier (primary key) must be unique to identify specific member of the entity.  Referential integrity: A foreign key value in a many- side table should match primary key value in the one-side table (Create ORDER only to an existing CUSTOMER, or we have to add a customer first before having business with him/her)  Domain integrity: error exists when field value is outside the range/type IS 530 : Lecture 4 47

48 IS 530 : Lecture 448 EMPLOYEE AttributesTypesSizeDescriptionAuthorization EmpIDNumeric6IdentifierHR Manager EmpFirstNameText10Employee First NameHR Manager EmpLastNameText10Employee Last NameHR Manager AddressText50Employee AddressHR Manager CityText10Employee CityHR Manager StateText2Employee Last NameHR Manager ZipTextXXXXXEmployee Last NameHR Manager PhoneTextXXX-XXX-XXXXEmployee Last NameHR Manager Date HiredDateMM/DD/YYDate Hired EmployeeHR Manager PositionText15Position of EmployeeHR Manager EXSPENSE AttributesTypesSizeDescriptionAuthorization EntryNumberNumeric6IdentifierProject Manager EntryDateDateMM/DD/YYDate of EntryProject Manager HoursWorkedNumeric2Hours per TaskProject Manager CostOfHotelCurrency3Fund Spent on HotelHR Clerk CostOfTravelCurrency3Fund Spent on TravelHR Clerk CostOfMealsCurrency3Fund Spent on FoodHR Clerk ApprovedY/N1Approved / Not YetProject Manager Data Dictionary

49 From REAL Model... Product Cash SalesSalesperson Customer Cash Collection Cashier ResourcesEventsAgents IS 530 : Lecture 449

50 From Logical Data Model Customer Cust No Order Order No Product Product No CUSTOMER (Cust No, ….) ORDER (Order No, Cust No, ….) PRODUCT (Product No,…) ORDER-PRODUCT (OrderNo, ProductNo, …) place contain Entity-Relationship Diagram: Relational Data Model (Data Schema): IS 530 : Lecture 450

51 ... to Physical Implementation with MS Access IS 530 : Lecture 451

52 Elements of Relational Databases  Tables: place to store data.  Queries: tools that allow users to access the data stored in various tables and to transform data into information.  Forms: onscreen presentations that allow users to view data in tables or collected by queries from one or more tables and input new data.  Reports: printed lists and summaries of data stored in tables or collected by queries from one or more tables. IS 530 : Lecture 452

53 IS 530 : Lecture 4 Database Engine Database Form Builder Report Writer Interactive Query Tool Application Program Database Front-end Database Gateway To other computer systems To other DBMS brands Elements Of Relational Databases... 53

54 Database Normalization  Normalization : A technique for making complex databases more efficient and more easily handled by the DBMS Eliminates data redundancy Each entity stores info about one thing/object only  Structure of tables must comply with several rules called normal forms to transform data tables that are not in normal form into tables that comply with the rules.  Failure to normalize results in anomalies: errors when adding, changing, or deleting data stored in the database. IS 530 : Lecture 454

55 IS 530 : Lecture 455 Normalization First normal form (1NF) – an entity whose attributes have no more than one value for a single instance of that entity Any attributes that can have multiple values actually describe a separate entity, possibly an entity and relationship. Second normal form (2NF) – an entity whose nonprimary-key attributes are dependent on the full primary key. Any nonkey attributes that are dependent on only part of the primary key should be moved to any entity where that partial key is actually the full key. This may require creating a new entity and relationship on the model. Third normal form (3NF) – an entity whose nonprimary-key attributes are not dependent on any other non-primary key attributes. Any nonkey attributes that are dependent on other nonkey attributes must be moved or deleted. Again, new entities and relationships may have to be added to the data model.

56 IS 530 : Lecture 456 Normalization in Plain English !!!  First normal form (1NF) : No repeating group of a same attribute (multi-valued attribute) If not: create a new entity/record for this group.  Second normal form (2NF) Attributes should depend on the whole (composite) key, not part of it (partial functional dependency). If not: create a new entity for these partial depended attributes  Third normal form (3NF) Attributes should depend on the (primary) key only, not on each other – a non-key attribute (transitive dependency) If not: create new entity for these partial depended attributes

57 Unnormalized Relation IS 530 : Lecture 457 Observation: Repeating groups / multi-value attributes !!!

58 Relation in 1NF IS 530 : Lecture 458 Observation: Attributes depend on a part of the key !!!

59 Relations in 2NF IS 530 : Lecture 459 Observation: Attributes depend on a non-key attribute !!!

60 Relations in 3NF IS 530 : Lecture 460 Observation: Each table stores data about one thing only.

61 Example of Relational Database IS 530 : Lecture 461

62 Example of Relational Database... IS 530 : Lecture 462

63 Data Warehouses for Data Mining  Data Warehousing: use IT / IS to collect, organize, integrate, and store entity-wide data to provide users with easy access to large quantities of varied data from across the organization to improve decision- making capabilities.  Data Mart : a subset of Data Warehouse to store special purposed data  Metadata is an index of DB: what, format, where  Data Mining: exploration, aggregation, and analysis of data in data warehouses using analytical tools and exploratory techniques. IS 530 : Lecture 463

64 Data Warehouse IS 530 : Lecture 464

65 Knowledge Management (KM)  Explicit Knowledge : anything that can be documented, archived, or codified often with the help of information systems  Tacit Knowledge : the processes and procedures on how to effectively perform a particular task stored in a persons mind  Knowledge Assets : all underlying skills routines, practices, principles, formulas, methods, heuristics, and intuitions whether explicit or tacit  Knowledge Management (KM) : the process an organization uses to gain the greatest value from its knowledge assets IS 530 : Lecture 465

66 Decisions Aids  Decision aids: Information systems that help decision makers with aggregate information, what-if analyses....  Includes: Decision Support Systems Executive Information Systems Expert Systems Intelligent Agents IS 530 : Lecture 466

67 Decision Support Systems (DSS)  Decision support systems (DSS): information systems that assist managers with unstructured decisions by retrieving data and generating information. Possesses interactive capabilities (What-if analyses.) Can answer ad-hoc inquires. Provides data modeling facilities.  Can imitate human decision making (i.e., artificial intelligence ) when confronting complex and ambiguous situations (tacit knowledge, underlying nonlinear relationships from historical data) IS 530 : Lecture 467

68 Executive Information Systems (EIS)  Executive Information Systems (EIS) / Executive Support Systems (ESS) : information systems, often considered a subset of DSS, that combine information from the organization and the environment, organize and analyze the information, and present the information to the manager in an aggregate form to assists decision making. IS 530 : Lecture 468

69 Group Support Systems (GSS)  Group Support Systems (GSS) / Group Decision Support Systems (GDSS): computer based systems that support collaborative intellectual work such as: idea generation, elaboration, analysis, synthesis, information sharing, and decision making  Supports brainstorming (a method for freely and creatively generating as many ideas as possible without undue regard for their practicality or realism). IS 530 : Lecture 469

70 Expert Systems (ES) and Neural Networks (NN]  Expert Systems (ES): decision support systems for: complex decisions, where consistency is desirable, minimize time and maximize quality. Emulates the problem solving techniques of human experts.  Neural Networks (NN): computer hardware and software systems that mimic the human brain’s ability to recognize patterns or predict outcomes using less-than complete information. IS 530 : Lecture 470

71 Intelligent Agents (IA)  Intelligent Agent (IA): software program that may be integrated into DSS or other software tools (such as word processing, spreadsheet, or database packages).  Once set in motion, these so-called “bots,” or “robots,” continue to perform their tasks without further direction from the user. IS 530 : Lecture 471

72 Business Intelligence (BI)  Business intelligence (BI) : uses state-of-the-art information technologies for storing and analyzing data to help managers make the best possible decisions for their companies.  BI systems are specifically designed to support managers in making tactical and strategic decisions.  BI is often installed into an existing ERP as an additional module. IS 530 : Lecture 472


Download ppt "IS 630 : Accounting Information Systems Relational Databases & Data Modeling with ERD Lecture 4."

Similar presentations


Ads by Google