1 Systems Analysis & Design IS 431: Lecture 9 CSUN Information Systems Database Design.

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
Accounting System Design
Relational Databases Chapter 4.
Oct 31, 2000Database Management -- Fall R. Larson Database Management: Introduction to Terms and Concepts University of California, Berkeley School.
14.1 Dr. Honghui Deng Assistant Professor MIS Department UNLV MIS 370 System Analysis Theory.
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.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
Conventional Files Versus the Database
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.
Michael F. Price College of Business Chapter 6: Logical database design and the relational model.
IST Databases and DBMSs Todd S. Bacastow January 2005.
Database Design. Database Concepts for the Systems Analyst  Fields  Fields are common to both files and databases.  A field is the implementation.
PHASE 3: SYSTEMS DESIGN Chapter 7 Data Design.
Database System Concepts and Architecture Lecture # 3 22 June 2012 National University of Computer and Emerging Sciences.
1 DATABASE TECHNOLOGIES BUS Abdou Illia, Fall 2007 (Week 3, Tuesday 9/4/2007)
Irwin/McGraw-Hill Copyright © 2000 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS5th Edition.
CS370 Spring 2007 CS 370 Database Systems Lecture 2 Overview of Database Systems.
Introduction –All information systems create, read, update and delete data. This data is stored in files and databases. Files are collections of similar.
Chapter 1 Overview of Database Concepts Oracle 10g: SQL
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 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:
Lecture 2 An Overview of Relational Database IST 318 – DB Admin.
Chapter 6 1 © Prentice Hall, 2002 The Physical Design Stage of SDLC (figures 2.4, 2.5 revisited) Project Identification and Selection Project Initiation.
I Information Systems Technology Ross Malaga 4 "Part I Understanding Information Systems Technology" Copyright © 2005 Prentice Hall, Inc. 4-1 DATABASE.
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.
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
Chapter 12: Designing Databases
5-1 McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved.
Lecture2: Database Environment Prepared by L. Nouf Almujally 1 Ref. Chapter2 Lecture2.
Lecture # 3 & 4 Chapter # 2 Database System Concepts and Architecture Muhammad Emran Database Systems 1.
DataBase Management System What is DBMS Purpose of DBMS Data Abstraction Data Definition Language Data Manipulation Language Data Models Data Keys Relationships.
MANAGING DATA RESOURCES ~ pertemuan 7 ~ Oleh: Ir. Abdul Hayat, MTI.
1 CS 430 Database Theory Winter 2005 Lecture 2: General Concepts.
Prepared By Prepared By : VINAY ALEXANDER ( विनय अलेक्सजेंड़र ) PGT(CS),KV JHAGRAKHAND.
Copyright 2006 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Third Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
Data resource management
Irwin/McGraw-Hill Copyright © 2004 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS6th Edition.
SYS364 Database Design Continued. Database Design Definitions Initial ERD’s Normalization of data Final ERD’s Database Management Database Models File.
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
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 14 Database Design.
©2003 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, Romney/Steinbart 4-1 Relational Databases.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Chapter 9 Designing Databases 9.1.
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.
©2003 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, Romney/Steinbart 4-1 Relational Databases.
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.
Data Resource Management Data Concepts Database Management Types of Databases Chapter 5 McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies,
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 14 Database Design.
Getting started with Accurately Storing Data
Databases and DBMSs Todd S. Bacastow January
Chapter 4 Relational Databases
Translation of ER-diagram into Relational Schema
Basic Concepts in Data Management
Chapter 14 Database Design Chapter 14 – Database Design.
Accounting System Design
Accounting System Design
Presentation transcript:

1 Systems Analysis & Design IS 431: Lecture 9 CSUN Information Systems Database Design

IS 431 : Lecture 9 2 Database Design in SDLC

IS 431 : Lecture 9 3 Database Design Elements of a Database Evolution of Database Systems DBMS Architecture Relational Data Model and Relational Database Systems

IS 431 : Lecture 9 4 A field is the physical implementation of a data attribute. They are the smallest unit of meaningful data. A key (identifier) is a field having unique values to identify one and only one record in a file. A secondary key is an alternate identifier for a record. A descriptive field is any other (non-key) field that stores business data. Data Fields

IS 431 : Lecture 9 5 Records A record is a collection of fields arranged in a predefined format. –Fixed-length record structures –Variable-length record structures

IS 431 : Lecture 9 6 Files A file is the set of all occurrences of a given record structure. –Types  Master files  Transaction files  Document files  Archival files  Table lookup files  Audit files –File organization: index, sequential … –File access: direct, sequential …

IS 431 : Lecture 9 7 Conventional Files vs. the Database 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 files – Records in one file (or table) are physically related to records in another file (or table). –Applications are built around the integrated database

IS 431 : Lecture 9 8 Files vs. Database

IS 431 : Lecture 9 9 Pros and Cons of Conventional Files Pros: –Easy to design because of their single-application focus –Excellent performance due to optimized organization for a single application Cons –Harder to adapt to sharing across applications –Harder to adapt to new requirements –Need to duplicate attributes in several files.

IS 431 : Lecture 9 10 Pros and Cons of Databases Pros: –Data independence from applications increases adaptability and flexibility –Superior scalability –Ability to share data across applications –Less, and/or controlled redundancy (total non-redundancy is not achievable) Cons: –More complex than file technology –Somewhat slower performance –Investment in DBMS and database experts –Need to adhere to design principles to realize benefits –Increased vulnerability due to consolidating data in a centralized database

IS 431 : Lecture 9 11 Logical Structure of a Database Inventory SalesCustomer Cash Receipt INVENTORY RECORD Item_No INT(5), non-null, index=itemx Description CHAR(20) Cost CURRENCY (6,2) EXTERNAL LEVEL CONCEPTUAL LEVEL INTERNAL LEVEL VIEW AVIEW BVIEW C

IS 431 : Lecture 9 12 Evolution of Database Systems File Management (Flat File) Systems Hierarchical Databases Network Databases Relational Databases Object-Oriented Databases Data Warehouse

IS 431 : Lecture 9 13 File Management Systems EMPLOYEE UPDATE PROGRAM FD EMPLOYEE MASTER FILE EMPLOYEE REPORT PROGRAM FD CHECK-WRITING PROGRAM FD TIMECARD FILE

IS 431 : Lecture 9 14 Hierarchical Databases Car EngineBodyChassis Left Door Right Door Hood Roof HandleWindowLock

IS 431 : Lecture 9 15 Network Databases Acme Mfg. First Corp. Size 4 Widget 4D Bolt #11231#11232#11233#11234#11235 CUSTOMERSPRODUCTS ORDERS

IS 431 : Lecture 9 16 Relational Databases CUSTOMERSPRODUCTS ORDERS CUST ID PRODUCT ID ORDER # 1 1 QUANTITY M M

IS 431 : Lecture 9 17 Object-Oriented Databases 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 Drop Order Method Data 11 * *

IS 431 : Lecture 9 18 Data Warehouse

IS 431 : Lecture 9 19 Difficulties of Non-Relational Tables 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

IS 431 : Lecture 9 20 Relational Data Model Table (Relation) –Row : specific occurrence of an entity –Column : characteristic of an entity, must be single-valued and same data type for all occurrences Primary Key: unique identifier of an occurrence of an entity (entity integrity) Foreign Key: to link tables together, must be null or corresponding to value of a primary key in another table (referential integrity)

IS 431 : Lecture 9 21 Requirements of Relational Data Model Primary Key must be unique Foreign Key must either be null or corresponding to existing value of a primary key of another table (to link with this table) Column describes a characteristic of an object identified by primary key Column is single-value ( ex: not “$100, $250” ) Values in rows of a specific column must be of the same data type Column order or row order are unimportant

IS 431 : Lecture 9 22 Database Integrity Entity integrity: error exists when identifiers (primary keys) are not unique to identify specific instances of the entity (2 customers have a same identification) Referential integrity: error exists when a foreign key value in one table has no matching primary key value in the related table (Sell to non-existing customers) Domain integrity:error exists when field value is outside the range (a pencil costs $100,000 !!!)

IS 431 : Lecture 9 23 Data Architecture A business’s data architecture defines how that business will develop and use files and databases to store all of the organization’s data; the file and database technology to be used; and the administrative structure set up to manage the data resource. Data is stored in some combination of: –Conventional files –Operational databases (also called transactional databases) –Data warehouses –Personal databases –Work group databases

IS 431 : Lecture 9 24 A Modern Data Architecture

IS 431 : Lecture 9 25 Database Architecture Database architecture refers to the database technology including the database engine, database utilities, CASE tools, and database development tools. A database management system (DBMS) is specialized software that is used to create, access, control, and manage the database. The core of the DBMS is a database engine. –A data definition language (DDL) is that part of the engine used to physically define tables, fields, and structural relationships: (CREATE TABLE; ALTER TABLE …) –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 files (tables) in the database: (INSERT; SELECT… FROM …WHERE…)

IS 431 : Lecture 9 26 Typical DBMS Architecture

IS 431 : Lecture 9 27 Goals of Database Design 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 adaptable and scalable to new and unforeseen requirements and applications.

IS 431 : Lecture 9 28 Normalization Revisited First normal form (1NF) : –No repeating group of a same attribute –If not: create a new entity for this group. Second normal form (2NF) –Attributes depend on the (composite) key, not part of it. –If not: create a new entity for these partial depended attributes Third normal form (3NF) –Attributes depend on the (primary) key only, not on each other –If not: create new entity for these partial depended attributes

IS 431 : Lecture 9 29 Database Models An Entity Relationship Diagram (ERD) is the logical model of the data requirements (data to be stored in the system and their relationships. A Database Schema (physical data model) is the blueprint of the planned implementation of the logical model. One can also use Relational Data Model as a blueprint of relational database design.

IS 431 : Lecture 9 30 Physical Data Types 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 numberNUMBER DECIMAL (size, decimal places) or NUMERIC (size, decimal places) DECIMAL (size, decimal places) or NUMERIC (size, decimal places) or NUMBER

IS 431 : Lecture 9 31 Physical Data Types … Logical Data Type to be stored in field) Physical Data Type MS Access Physical Data Type Microsoft SQL Server Physical Data Type Oracle Financial NumberCURRENCYMONEY 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 not supported Yes or No; or True or False YES/NOBIT use CHAR(1) and set a yes or no domain ImageOLE OBJECT IMAGELONGRAW HyperlinkHYPERLINK VARBINARYRAW Can designer define new data types? NO YES

IS 431 : Lecture 9 32 Data Distribution Data distribution analysis establishes which business locations need access to which logical data entities and attributes.  Centralization  Horizontal distribution (Data partitioning: Rows or Records)  Vertical distribution (Data partitioning: Columns or Attributes)  Replication

IS 431 : Lecture 9 33 Data Distribution Options Store all data on a single server (Centralization) Store specific tables on different servers. Store subsets of a specific table on different servers –Subsets of columns (Vertical Partitioning) –Subsets of rows (Horizontal Partitioning) Replicate (duplicate) specific tables or subsets on different servers for back up (Replication)

IS 431 : Lecture 9 34 Database Distribution Vertical partitioning

IS 431 : Lecture 9 35 Database Distribution Horizontal partitioning

IS 431 : Lecture 9 36 Database Distribution

IS 431 : Lecture 8 37 Database Distribution

IS 431 : Lecture 9 38 Relational Databases Relational databases implement 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 are programs embedded within a table that are automatically invoked by updates to another table. –Stored procedures are programs embedded within a table that can be called from an application program.

IS 431 : Lecture 9 39 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.

IS 431 : Lecture 9 40 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 (1,1)(1,M) (1,N)

IS 431 : Lecture 9 41 to Physical Data Model (Relational Schema) …

IS 431 : Lecture 9 42 …to “MS Access” Implementation.

IS 431 : Lecture 9 43 Database Components 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

IS 431 : Lecture 9 44 The Role of SQL 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 SQL

IS 431 : Lecture 9 45 Administrators Data administrator is responsible for the data planning, definition, architecture, and management in the organization. (CIO) Database administrators are responsible for the database technology, database design and construction, security, backup and recovery, and performance tuning. (Supervisors)