CH 10 DB Application Design n 10.1 Functions n 10.2 Case Application n 10.3 Creating, Reading, Updating, Deleting View n 10.4 Form Design n 10.5 Report.

Slides:



Advertisements
Similar presentations
Designing tables from a data model (Chapter 6) One base table for each entity.
Advertisements

BUSINESS DRIVEN TECHNOLOGY Plug-In T4 Designing Database Applications.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 11-1 David M. Kroenke’s Chapter Eleven: Managing Databases with SQL Server.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 9-1 COS 346 Day 20.
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 5/1 Copyright © 2004 Please……. No Food Or Drink in the class.
Fundamentals, Design, and Implementation, 9/e COS 346 Day 8.
Systems Development Life Cycle
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 4-1 David M. Kroenke Database Processing Chapter 7/8 Structured Query.
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 10 Database Application Design.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 7-1 COS 346 Day 11.
Fundamentals, Design, and Implementation, 9/e Chapter 5 Database Design.
Getting Started (Excerpts) Chapter One DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition.
1 © Prentice Hall, 2002 Chapter 5: Logical Database Design and the Relational Model Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B.
Fundamentals, Design, and Implementation, 9/e Chapter 7 Using SQL in Applications.
Database Design Concepts INFO1408 Term 2 week 1 Data validation and Referential integrity.
A Guide to MySQL 7. 2 Objectives Understand, define, and drop views Recognize the benefits of using views Use a view to update data Grant and revoke users’
BUSINESS DRIVEN TECHNOLOGY
A Guide to SQL, Seventh Edition. Objectives Understand, create, and drop views Recognize the benefits of using views Grant and revoke user’s database.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 7-1 David M. Kroenke’s Chapter Seven: SQL for Database Construction and.
Information systems and databases Database information systems Read the textbook: Chapter 2: Information systems and databases FOR MORE INFO...
Transforming Data Models into Database Designs
IS 325 Notes for Wednesday September 18, 2013.
Concepts of Database Management Seventh Edition
6-1 DATABASE FUNDAMENTALS Information is everywhere in an organization Information is stored in databases –Database – maintains information about various.
Copyright  Oracle Corporation, All rights reserved. 5 CMIS Powell Oracle Designer: Design Editor and Building the Database and Table API CMIS.
An Investigation of Oracle and SQL Server with respect to Integrity, and SQL Language standards Presented by: Paul Tarwireyi Supervisor: John Ebden Date:
Learningcomputer.com SQL Server 2008 – Entity Relationships in a Database.
STORING ORGANIZATIONAL INFORMATION— DATABASES CIS 429—Chapter 7.
Concepts of Database Management, Fifth Edition Chapter 1: Introduction to Database Management.
Concepts and Terminology Introduction to Database.
MIS 301 Information Systems in Organizations Dave Salisbury ( )
MIS 301 Information Systems in Organizations Dave Salisbury ( )
Lecture 7 Integrity & Veracity UFCE8K-15-M: Data Management.
David M. Kroenke and David J. Auer Database Processing: F undamentals, Design, and Implementation Chapter Six: Transforming Data Models into Database Designs.
Database Application Design n Characteristics of Database Applications n Form Design n Report Design n Application Program Design.
SQL Structured Query Language Programming Course.
DAY 12: DATABASE CONCEPT Tazin Afrin September 26,
1 Database Concepts 2 Definition of a Database An organized Collection Of related records.
1 Relational Databases and SQL. Learning Objectives Understand techniques to model complex accounting phenomena in an E-R diagram Develop E-R diagrams.
8 8 Chapter 8 The University Lab: Conceptual Design Verification, Logical Design, and Implementation Database Systems: Design, Implementation, and Management.
IST 220 Introduction to Databases Course Wrap-up.
Database Application Design and Data Integrity AIMS 3710 R. Nakatsu.
1 © Prentice Hall, 2002 Chapter 5: Logical Database Design and the Relational Model Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B.
1 CSE 2337 Introduction to Data Management Access Book – Ch 1.
Chapter 10 Database Application Design David M. Kroenke Database Processing © 2000 Prentice Hall.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
Commercial RDBMSs Access and Oracle. Access DBMS Architchecture  Can be used as a standalone system on a single PC: -JET Engine -Microsoft Data Engine.
INTRODUCTION lecture1 1. Data base concept Data is a meaningless static value. What does 3421 means? Information is the data you process in a manner that.
Information Access Mgt09/12/971 Entity-Relationship Design Information Level Design.
1 ER Modeling BUAD/American University Mapping ER modeling to Relationships.
Session 1 Module 1: Introduction to Data Integrity
Logical Database Design and the Relational Model.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 5 (Part a): Logical Database Design and the Relational Model Modern Database Management.
Chapter 3: Relational Databases
Lecture 4: Logical Database Design and the Relational Model 1.
David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Chapter Six: Transforming Data Models into Database Designs.
XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Level 2 Objectives: Understanding and Creating Table.
Introduction to Database Development CH2. CH2. Introduction to DB Development Database n Components of Database Systems (Figure 2-1) –User data –Metadata.
Chapter Six: Transforming Data Models into Database Designs 6-1.
Chapter 4 Logical Database Design and the Relational Model
Chapter 4: Logical Database Design and the Relational Model
Transforming Data Models
Chapter 5: Logical Database Design and the Relational Model
CHAPTER 4: LOGICAL DATABASE DESIGN AND THE RELATIONAL MODEL
Database Processing: David M. Kroenke’s Chapter Seven:
Chapter 7 Using SQL in Applications
Entities Things about which you need to store data. One entity for each different thing. At least two attributes At least two occurrences Not a property.
Chapter 7 Using SQL in Applications
Guide to Modeling Keys to E-R diagrams.
Guide to Modeling Keys to E-R diagrams.
Presentation transcript:

CH 10 DB Application Design n 10.1 Functions n 10.2 Case Application n 10.3 Creating, Reading, Updating, Deleting View n 10.4 Form Design n 10.5 Report Design n 10.6 Enforcing Constraints n 10.7 Security and Control

Ch - 10 Application Design page DB Application Design n Introduce fundamental concepts in database application design n Between DBMS and Application –In the early days it was easy to find a line between them –Today the line between them has become blurred

Ch - 10 Application Design page Functions of a database application

Ch - 10 Application Design page n View: more than a row of a table and more than the result of a SQL statement –Often the construction of an application view requires two or more SQL statements n Difference: –Data Content(view) and appearance of that content(format) –A given view usually has many different formats n Enforcing constraint: 2 types of constraints –Structural: requiring data values to fit domain spec., ensuring uniqueness, or relationship cardinalities –Business Rule: “No salesman can sell to a customer whose billing address is outside of his region” n Security and Control: –Application work in conjunction with the OS and DBMS to augment security provided by user names and passwords

Ch - 10 Application Design page n Executing business logic: –e.g., In an order entry application: when a customer orders 5 copies of book, the application needs to reduce the quantity of that book on hand by 5. If insufficient copies are in inventory, or if the quantity on hand is less than the reorder quantity, other action needs to be taken.

Ch - 10 Application Design page Case Application: view ridge gallery View Ridge Gallery is a small art gallery that sells contemporary fine art, including lithographs, original paintings, and photographs, all of the lithographs and photos are signed and numbered, and most of the art is priced between $1,000 and $25,000. View Ridge Gallery has been in business for 27 years, has one full-time owner, three salespeople, and two workers who make frames, hang art in the gallery, and prepare art works for shipment. View Ridge holds openings and other gallery events to attract customers to the gallery. Art is also placed on display in local companies and restaurants and in other public places. View Ridge owns all of the art that it sells; it holds no item on a consignment basis.

Ch - 10 Application Design page n Summary of Requirements

Ch - 10 Application Design page n Database Design –Figure 10: View Ridge Gallery Database Design –View Ridge wants to be able to track its customers’ interests –CUSTOMER and ARTIST is in M:N relationship –WORK and TRANSACTION is weak entity relationship –Figure (c) shows table design –Figure (d) shows better table design(less data are duplicated) –Figure (e) shows relationship diagram

Ch - 10 Application Design page

n Creating, Reading, Updating, and Deleting View Ridge –A view is a structured list of data items from the entities or semantic objects defined in the data model –Figure 10-4 shows customer view(structured list of attributes and sample data) –A view is a structured list of attributes –Also a view is a list of data values only –View can be formatted or materialized in many different ways(as a form, as a report, or in some other type of materialization)

Ch - 10 Application Design page

Insert Into Table Value(.... ) Update Table Set attribute= value Where condition Delete Table Where condition

Ch - 10 Application Design page n The second major function of a DB application is to generate materializations of views n Form is a screen display used for data entry and edit –Read only form(user) –Data entry and edit form(developer) n Discuss several principles of good form design Form Design

Ch - 10 Application Design page 1. Form structure should reflect the view structure 2. The semantics of the data should be graphically evident 3. The form structure should encourage appropriate action 4. Forms in a GUI environment –Drop-down list box –Option buttons and groups –Check boxes 5. Cursor movement and pervasive keys –Cursor follows the end user’s processing pattern as he or she reads the source data entry documents –The actions of special purpose keys such as ESC and function keys should be consistent and pervasive

Ch - 10 Application Design page

n The principles of effective report design are similar to those for form design(just as with forms, the structure of a report should reflect the structure of the underlying view) n Figure n It is difficult to construct a report that follows more than one multi-value path through the DB schema Report Design

Ch - 10 Application Design page

n DBMS is often the better place to enforce constraints(it is a central point through which all data changes must pass) n When possible, enforce constraints at the DBMS; if not, enforce them in application n Four types of constraint: –Domain, uniqueness, relationship cardinality, business rules Enforcing Constraints

Ch - 10 Application Design page n Domain constraint –E.g., copy attribute(format: nn/mm, nn<=mm) –Need to develop validation code to ensure format Purchase date <= now() Minimum cardinality is mandatory: required field set to yes(attribute must have a value)

Ch - 10 Application Design page

n Uniqueness constraint –Figure 10-16: Indexed set to yes(no duplicates) –Ensure that no duplicated artist names are entered from any source

Ch - 10 Application Design page n Relationship cardinality constraints

Ch - 10 Application Design page n Relationship cardinality constraints

Ch - 10 Application Design page –Enforce referential integrity(check box in relationship) To insert a record in child table related record must exist in parent table –Cascade update related records(check box in relationship) –Cascade delete related records(check box in relationship) Effect in parent side record deletion not child side

Ch - 10 Application Design page n Business rule constraint –Because business rules are application dependent, there are no generic features of DBMS products for enforcing them –DBMS products provide means for inserting code before or after most important events(e.g., MS access form design) –Figure –With server DBMS products such as ORACLE or SQL server, a similar means is used(logic can be enforced in triggers, which are program segments that are invoked when events occurs in the database)

Ch - 10 Application Design page

n Security –Most DBMS products provide user name and password level of security(does not help in limiting the instances of data that users can view) –Horizontal security: would limit access to certain rows, but all columns could be seen –Vertical security: would limit access to certain columns, but all rows could be seen –Applications that limit users to certain forms, reports, tables, or columns provide vertical security –Those that limit users to certain data in forms, reports, tables, or columns provide horizontal security –User name and password can be readily used to provide vertical security –Horizontal security generally requires developers to write application code Security and Control

Ch - 10 Application Design page n Control –Most database application provide control via menus –Figure10-22 –In multi-user processing, one user’s actions do not have inappropriate side consequences on a second user’s actions –Transaction control: identify boundaries of work that must be completed as a unit(called transaction boundaries) –E.g., a series of SQL for creating a view need to be completed as a unit, as a single transaction

Ch - 10 Application Design page