14.1 Dr. Honghui Deng Assistant Professor MIS Department UNLV MIS 370 System Analysis Theory.

Slides:



Advertisements
Similar presentations
Relational Database and Data Modeling
Advertisements

Chapter 10: Designing Databases
Irwin/McGraw-Hill Copyright © 2000 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS5th Edition.
C6 Databases.
Management Information Systems, Sixth Edition
Managing Data Resources
Copyright Irwin/McGraw-Hill Database Design Prepared by Kevin C. Dittman for Systems Analysis & Design Methods 4ed by J. L. Whitten & L. D. Bentley.
File Systems and Databases
CS 432 Object-Oriented Analysis and Design
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 14 Database Design.
Irwin/McGraw-Hill Copyright © 2004 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS6th Edition.
Introduction to Databases Transparencies
Introduction to Database Management
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
BUSINESS DRIVEN TECHNOLOGY
Conventional Files Versus the Database
Mgt 20600: IT Management & Applications Databases Tuesday April 4, 2006.
Copyright Irwin/McGraw-Hill Database Design Introduction  The chapter will address the following questions:  What are the similarities and differences.
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 14 Database Design.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
Chapter 14 & 15 Conceptual & Logical Database Design Methodology
Database Design. Database Concepts for the Systems Analyst  Fields  Fields are common to both files and databases.  A field is the implementation.
1 Systems Analysis & Design IS 431: Lecture 9 CSUN Information Systems Database Design.
Database System Concepts and Architecture Lecture # 3 22 June 2012 National University of Computer and Emerging Sciences.
Irwin/McGraw-Hill Copyright © 2000 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS5th Edition.
5.1 © 2007 by Prentice Hall 5 Chapter Foundations of Business Intelligence: Databases and Information Management.
Introduction –All information systems create, read, update and delete data. This data is stored in files and databases. Files are collections of similar.
6-1 DATABASE FUNDAMENTALS Information is everywhere in an organization Information is stored in databases –Database – maintains information about various.
Irwin/McGraw-Hill Copyright © 2000 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS5th Edition.
McGraw-Hill/Irwin© 2008 The McGraw-Hill Companies, All Rights Reserved Chapter 13 Database Design.
Database Technical Session By: Prof. Adarsh Patel.
STORING ORGANIZATIONAL INFORMATION— DATABASES CIS 429—Chapter 7.
Chapter 9 Designing Databases Modern Systems Analysis and Design Sixth Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich.
Chapter 7: Database Systems Succeeding with Technology: Second Edition.
CHAPTER 8: MANAGING DATA RESOURCES. File Organization Terms Field: group of characters that represent something Record: group of related fields File:
311: Management Information Systems Database Systems Chapter 3.
Discovering Computers Fundamentals Fifth Edition Chapter 9 Database Management.
Storing Organizational Information - Databases
14-1 Goals of Database Design A database should provide for efficient storage, update, and retrieval of data. A database should be reliable—the stored.
Announcements. Data Management Chapter 12 Traditional File Approach  Structure Field  Record  File  Fixed All records have common fields, and a field.
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
C6 Databases. 2 Traditional file environment Data Redundancy and Inconsistency: –Data redundancy: The presence of duplicate data in multiple data files.
5-1 McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved.
Lecture # 3 & 4 Chapter # 2 Database System Concepts and Architecture Muhammad Emran Database Systems 1.
McGraw-Hill/Irwin © 2008 The McGraw-Hill Companies, All Rights Reserved Chapter 7 Storing Organizational Information - Databases.
6.1 © 2010 by Prentice Hall 6 Chapter Foundations of Business Intelligence: Databases and Information Management.
MANAGING DATA RESOURCES ~ pertemuan 7 ~ Oleh: Ir. Abdul Hayat, MTI.
Copyright 2006 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Third Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
SQL Fundamentals  SQL: Structured Query Language is a simple and powerful language used to create, access, and manipulate data and structure in the database.
Management Information Systems, 4 th Edition 1 Chapter 8 Data and Knowledge Management.
Irwin/McGraw-Hill Copyright © 2004 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS6th Edition.
GLOBEX INFOTEK Copyright © 2013 Dr. Emelda Ntinglet-DavisSYSTEMS ANALYSIS AND DESIGN METHODSINTRODUCTORY SESSION EFFECTIVE DATABASE DESIGN for BEGINNERS.
Chapter 2 Relational Database Design and Normalization August
Physical Database Design Purpose- translate the logical description of data into the technical specifications for storing and retrieving data Goal - create.
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 14 Database Design.
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 14 Database Design.
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 14 Database Design.
Copyright Irwin/McGraw-Hill Database Design Prepared by Kevin C. Dittman for Systems Analysis & Design Methods 4ed by J. L. Whitten & L. D. Bentley.
Irwin/McGraw-Hill Copyright © 2004 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS6th Edition.
1 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Chapter 10 Designing Databases.
Introduction to Core Database Concepts Getting started with Databases and Structure Query Language (SQL)
Managing Data Resources File Organization and databases for business information systems.
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 14 Database Design.
Management Information Systems by Prof. Park Kyung-Hye Chapter 7 (8th Week) Databases and Data Warehouses 07.
Getting started with Accurately Storing Data
Chapter 4 Relational Databases
Chapter 14 Database Design Chapter 14 – Database Design.
MANAGING DATA RESOURCES
Data Model.
Presentation transcript:

14.1 Dr. Honghui Deng Assistant Professor MIS Department UNLV MIS 370 System Analysis Theory

14.2 Chapter 14 DATABASE DESIGN MIS 370 System Analysis Theory

14.3 Learning Objectives Compare and contrast conventional files and modern, relational databases.Compare and contrast conventional files and modern, relational databases. Define and give examples of fields, records, files, and databases.Define and give examples of fields, records, files, and databases. Describe modern data architecture of files, operational databases, data warehouses, personal databases, and work group databases.Describe modern data architecture of files, operational databases, data warehouses, personal databases, and work group databases. Compare roles of systems analyst, database administrator, and data administrator.Compare roles of systems analyst, database administrator, and data administrator. Describe architecture of database management systemDescribe architecture of database management system Describe how a relational database implements entities, attributes, and relationships from a logical data model.Describe how a relational database implements entities, attributes, and relationships from a logical data model. Transform a logical data model into a physical, relational database schema.Transform a logical data model into a physical, relational database schema. Generate SQL to create the database structure in a schema.Generate SQL to create the database structure in a schema.

14.4 Conventional Files versus the Database File – a collection of similar records.File – a collection of similar records. –Files are unrelated to each other except in the code of an application program. –Data storage is built around the applications that use the files. Database – a collection of interrelated filesDatabase – a collection of interrelated files –Records in one file (or table) are physically related to records in another file (or table). –Applications are built around the integrated database

14.5 Files versus Database

14.6 Pros and Cons of Conventional Files Pros Easy to design because of their single- application focusEasy to design because of their single- application focus Excellent performance due to optimized organization for a single applicationExcellent performance due to optimized organization for a single applicationCons Harder to adapt to sharing across applicationsHarder to adapt to sharing across applications Harder to adapt to new requirementsHarder to adapt to new requirements Need to duplicate attributes in several files.Need to duplicate attributes in several files.

14.7 Pros and Cons of Databases Pros Data independence from applications increases adaptability and flexibilityData independence from applications increases adaptability and flexibility Superior scalabilitySuperior scalability Ability to share data across applicationsAbility to share data across applications Less, and controlled redundancy (total non- redundancy is not achievable)Less, and controlled redundancy (total non- redundancy is not achievable)Cons More complex than file technologyMore complex than file technology Somewhat slower performanceSomewhat slower performance Investment in DBMS and database expertsInvestment in DBMS and database experts Need to adhere to design principles to realize benefitsNeed to adhere to design principles to realize benefits Increased vulnerability due to consolidating data in a centralized databaseIncreased vulnerability due to consolidating data in a centralized database

14.8 Fields Field – the smallest unit of meaningful data to be stored in a databaseField – the smallest unit of meaningful data to be stored in a database –the physical implementation of a data attribute –Primary key – a field that uniquely identifies a record. –Secondary key – a field that identifies a single record or a subset of related records. –Foreign key – a field that points to records in a different file. –Descriptive field – any nonkey field.

14.9 Records Record – a collection of fields arranged in a predetermined format.Record – a collection of fields arranged in a predetermined format. –Fixed-length record structures –Variable-length record structures Blocking factor – the number of logical records included in a single read or write operation (from the computer’s perspective).Blocking factor – the number of logical records included in a single read or write operation (from the computer’s perspective).

14.10 Files and Tables File – the set of all occurrences of a given record structure.File – the set of all occurrences of a given record structure. Table – the relational database equivalent of a file.Table – the relational database equivalent of a file. Types of conventional files and tables Types of conventional files and tables –Master files – Records relatively permanent though values may change –Transaction files – Records describe business events –Document files – Historical data for review without overhead of regenerating document –Archival files – Master and transaction records that have been deleted –Table lookup files – Relatively static data that can be shared to maintain consistency –Audit files – Special records of updates to other files

14.11 Data Architecture Data architecture – a definition of how:Data architecture – a definition of how: –Files and databases are to be developed and used to store data –The file and/or database technology to be used –The administrative structure set up to manage the data resource Data is stored in some combination of:Data is stored in some combination of: –Conventional files –Operational databases – databases that support day-to-day operations and transactions for an information system. Also called transactional databases. –Data warehouses – databases that store data extracted from operational databases. To support data miningTo support data mining –Personal databases –Work group databases

14.12 A Modern Data Architecture

14.13 Administrators Data administrator – a database specialist responsible for data planning, definition, architecture, and management.Data administrator – a database specialist responsible for data planning, definition, architecture, and management. Database administrator – a specialist responsible for database technology, database design, construction, security, backup and recovery, and performance tuning.Database administrator – a specialist responsible for database technology, database design, construction, security, backup and recovery, and performance tuning. –A database administrator will administer one or more databases

14.14 Database Architecture Database architecture – the database technology used to support data architectureDatabase architecture – the database technology used to support data architecture –Including the database engine, database utilities, CASE tools, and database development tools. Database management system (DBMS) – special software used to create, access, control, and manage a database.Database management system (DBMS) – special software used to create, access, control, and manage a database. –The core of the DBMS is its database engine. –A data definition language (DDL) is that part of the engine used to physically define tables, fields, and structural relationships. –A data manipulation language (DML) is that part of the engine used to create, read, update, and delete records in the database, and navigate between different records in the database.

14.15 Typical DBMS Architecture

14.16 Relational Databases Relational database – a database that implements stored data in a series of two-dimensional tables that are “related” to one another via foreign keys.Relational database – a database that implements stored data in a series of two-dimensional tables that are “related” to one another via foreign keys. –The physical data model is called a schema. –The DDL and DML for a relational database is called SQL (Structured Query Language). –Triggers – programs embedded within a database that are automatically invoked by updates. –Stored procedures – programs embedded within a database that can be called from an application program.

14.17 From Logical Data Model

14.18

14.19 User Interface for a Relational PC DBMS

14.20 What is a Good Data Model? A good data model is simpleA good data model is simple –The data attributes that describe an entity should describe only that entity A good data model is essentially nonredundantA good data model is essentially nonredundant –Each data attribute exists in at most one entity (except for foreign keys) A good data model should be flexible and adaptable to future needsA good data model should be flexible and adaptable to future needs These goals are achieved through database normalization.

14.21 Database Normalization An logical entity (or physical table) is in first normal form if there are no attributes (fields) that can have more than one value for a single instance (record).An logical entity (or physical table) is in first normal form if there are no attributes (fields) that can have more than one value for a single instance (record). An logical entity (or physical table) is in second normal form if it is already in first normal form and if the values of all nonprimary key attributes are dependent on the full primary key.An logical entity (or physical table) is in second normal form if it is already in first normal form and if the values of all nonprimary key attributes are dependent on the full primary key. An logical entity (or physical table) is in third normal form if it is already in second normal form and if the values of all nonprimary key attributes are not dependent on other nonprimary key attributes.An logical entity (or physical table) is in third normal form if it is already in second normal form and if the values of all nonprimary key attributes are not dependent on other nonprimary key attributes.

14.22 Goals of Database Design A database should provide for efficient storage, update, and retrieval of data.A database should provide for efficient storage, update, and retrieval of data. A database should be reliable - the stored data should have high integrity and promote user trust in that data.A database should be reliable - the stored data should have high integrity and promote user trust in that data. A database should be adaptable and scalable to new and unforeseen requirements and applications.A database should be adaptable and scalable to new and unforeseen requirements and applications.

14.23 Database Schema Database schema – a model or blueprint representing the technical implementation of the database.Database schema – a model or blueprint representing the technical implementation of the database. –Also called a physical data model

14.24 A Method for Database Design 1. Review the logical data model. 2. Create a table for each entity. 3. Create fields for each attribute. 4. Create an index for each primary and secondary key. 5. Create an index for each subsetting criterion. 6. Designate foreign keys for relationships. 7. Define data types, sizes, null settings, domains, and defaults for each attribute. 8. Create or combine tables to implement supertype/ subtype structures. 9. Evaluate and specify referential integrity constraints.

14.25 Data Types for Different Database Technologies Logical Data Type to be stored in field) Physical Data Type MS Access Physical Data Type Microsoft SQL Server Physical Data Type Oracle Fixed length character data (use for fields with relatively fixed length character data) TEXT CHAR (size) or character (size) CHAR (size) Variable length character data (use for fields that require character data but for which size varies greatly--such as ADDRESS) TEXT VARCHAR (max size) or character varying (max size) VARCHAR (max size) Very long character data (use for long descriptions and notes--usually no more than one such field per record) MEMOTEXT LONG VARCHAR or LONG VARCHAR2 Integer number NUMBER INT (size) or integer or smallinteger or tinuinteger INTEGER (size) or NUMBER (size) Decimal number NUMBER DECIMAL (size, decimal places) or NUMERIC (size, decimal places) DECIMAL (size, decimal places) or NUMERIC (size, decimal places) or NUMBER

14.26 Data Types for Different Database Technologies Logical Data Type to be stored in field) Physical Data Type MS Access Physical Data Type Microsoft SQL Server Physical Data Type Oracle Financial Number CURRENCYMONEY see decimal number Date (with time) DATE/TIME DATETIME or SMALLDATETIME Depending on precision needed DATE Current time (use to store the data and time from the computer’s system clock) not supported TIMESTAMP Yes or No; or True or False YES/NOBIT use CHAR(1) and set a yes or no domain Image OLE OBJECT IMAGELONGRAW HyperlinkHYPERLINKVARBINARYRAW Can designer define new data types? NOYESYES

14.27 Database Integrity Key integrity – Every table should have a primary key.Key integrity – Every table should have a primary key. Domain integrity – Appropriate controls must be designed to ensure that no field takes on an inappropriate valueDomain integrity – Appropriate controls must be designed to ensure that no field takes on an inappropriate value Referential integrity – the assurance tat a foreign key value in one table has a matching primary key value in the related table.Referential integrity – the assurance tat a foreign key value in one table has a matching primary key value in the related table. –No restriction –Delete: cascade –Delete: restrict –Delete: set null

14.28 Database Schema with Referential Integrity Constraints

14.29 Database Distribution and Replication Data distribution analysis establishes which business locations need access to which logical data entities and attributes.Data distribution analysis establishes which business locations need access to which logical data entities and attributes. –Centralization Entire database on a single server in one physical locationEntire database on a single server in one physical location –Horizontal distribution (also called partitioning) Tables or row assigned to different database servers/locations.Tables or row assigned to different database servers/locations. Efficient access and securityEfficient access and security Cannot always be easily recombined for management analysisCannot always be easily recombined for management analysis –Vertical distribution (also called partitioning) Specific columns of tables assigned to specific databases and serversSpecific columns of tables assigned to specific databases and servers Similar advantages and disadvantages of HorizontalSimilar advantages and disadvantages of Horizontal –Replication Data duplicated in multiple locationsData duplicated in multiple locations DBMS coordinates updates and synchronization of dataDBMS coordinates updates and synchronization of data Performance and accessibility advantagesPerformance and accessibility advantages Increases complexityIncreases complexity

14.30 Database Capacity Planning For each table sum the field sizes. This is the record size.For each table sum the field sizes. This is the record size. For each table, multiply the record size times the number of entity instances to be included in the table (planning for growth). This is the table size.For each table, multiply the record size times the number of entity instances to be included in the table (planning for growth). This is the table size. Sum the table sizes. This is the database size.Sum the table sizes. This is the database size. Optionally, add a slack capacity buffer (e.g. 10percent) to account for unanticipated factors. This is the anticipated database capacity.Optionally, add a slack capacity buffer (e.g. 10percent) to account for unanticipated factors. This is the anticipated database capacity.