Presentation is loading. Please wait.

Presentation is loading. Please wait.

CHAPTER 12: Design: Designing Databases 1.1 MSIS 5653 Advanced Systems Development Dursun Delen, Ph.D. Department of Management Oklahoma State University.

Similar presentations


Presentation on theme: "CHAPTER 12: Design: Designing Databases 1.1 MSIS 5653 Advanced Systems Development Dursun Delen, Ph.D. Department of Management Oklahoma State University."— Presentation transcript:

1

2 CHAPTER 12: Design: Designing Databases 1.1 MSIS 5653 Advanced Systems Development Dursun Delen, Ph.D. Department of Management Oklahoma State University

3 D. Delen MSIS 5653 – Advanced Systems Development Learning Objectives Define each of the following database terms Relation Primary key Normalization Functional dependency Foreign key Referential integrity Field Data type Null value Denormalization File organization Index Secondary key 12.2

4 D. Delen MSIS 5653 – Advanced Systems Development Learning Objectives Discuss the role of designing databases in the analysis and design of an information system Learn how to transform an E-R Diagram into an equivalent set of well-structured relations Learn how to merge normalized relations from separate user views into a consolidated set of well- structured relations Learn how to transform well-structured relations into efficient database tables Explain choices of storage formats for database fields Discuss use of different types of file organizations to store database files 12.3

5 D. Delen MSIS 5653 – Advanced Systems Development Designing Databases in SDLC

6 D. Delen MSIS 5653 – Advanced Systems Development Purpose of Database Design Capture/represent the data in stable structures, called normalized tables Not likely to change over time Minimal redundancy Develop a logical database design that reflects actual data requirements Develop a logical database design from which a physical database design can be developed Translate a database model into a technical file and database design that balances performance factors Choose data storage technologies that will efficiently, accurately and securely process database activities 12.5

7 D. Delen MSIS 5653 – Advanced Systems Development Process of Database Design Logical Design followed by Physical Design I. Logical Design Based upon the conceptual data model & user interfaces Four key steps: 1. Develop a logical data model for each known user interface for the application using normalization principles 2. Combine normalized data requirements from all user interfaces into one consolidated logical database model 3. Translate the conceptual E-R data model for the application into normalized data requirements 4. Compare the consolidated logical database design with the translated E-R model and produce one final logical database model for the application 12.6

8 D. Delen MSIS 5653 – Advanced Systems Development Process of Database Design II. Physical Design Based upon results of logical database design Key decisions 1. Choosing storage format for each attribute from the logical database model 2. Grouping attributes from the logical database model into physical records 3. Arranging related records in secondary memory (hard disks and magnetic tapes) so that records can be stored, retrieved and updated rapidly 4. Selecting media and structures for storing data to make access more efficient 12.7

9 D. Delen MSIS 5653 – Advanced Systems Development Deliverables and Outcomes Logical database design must account for every data element on a system input or output – forms, reports, interfaces Normalized relations are the primary deliverable Physical database design results in converting relations into files 12.8

10 D. Delen MSIS 5653 – Advanced Systems Development Process of Logical Data Modeling Step 1 Step 2

11 D. Delen MSIS 5653 – Advanced Systems Development Process of Logical Data Modeling Step 3 Step 4

12 D. Delen MSIS 5653 – Advanced Systems Development Relational Database Model Data represented as a set of related tables or relations Relation (or table) A named, two-dimensional table of data Each relation consists of a set of named columns and an arbitrary number of unnamed rows Properties: 1. Entries in cells are simple 2. Entries in columns are from the same set of values 3. Each row is unique 4. The sequence of columns can be interchanged without changing the meaning or use of the relation 5. The rows may be interchanged or stored in any sequence 12.11

13 D. Delen MSIS 5653 – Advanced Systems Development Relational Database Model Well-Structured Relation A relation that contains a minimum amount of redundancy and allows users to insert, modify and delete the rows without errors or inconsistencies 12.12 EMPLOYEE1(Emp_ID, Name, Dept, Salary)

14 D. Delen MSIS 5653 – Advanced Systems Development Normalization The process of converting complex data structures into simple, stable data structures Second Normal Form (2NF) Each nonprimary key attribute is identified by the whole key (called full functional dependency) Third Normal Form (3NF) Nonprimary key attributes do not depend on each other (called transitive dependencies) The result: every nonprimary key attribute depends upon the whole primary key 12.13

15 D. Delen MSIS 5653 – Advanced Systems Development Functional Dependency A particular relationship between two attributes. For a given relation, attribute B is functionally dependent on attribute A if, every valid value of A uniquely determines the value of B A  B; (e.g., Emp_ID  Name) Instances (or sample data) in a relation do not prove the existence of a functional dependency. It should come from the knowledge of the problem domain Primary Key An attribute whose value is unique across all occurrences of a relation 12.14 Functional Dependencies and Primary Keys

16 D. Delen MSIS 5653 – Advanced Systems Development Functional Dependencies and Primary Keys Second Normal Form (2NF) A relation is in second normal form (2NF) if any of the following conditions apply:  The primary key consists of only one attribute  No nonprimary key attributes exist in the relation  Every nonprimary key attribute is functionally dependent on the full set of primary key attributes 12.15

17 D. Delen MSIS 5653 – Advanced Systems Development Normalization 12.16 To convert a relation into 2NF, decompose the relation into new relations using the attributes, called determinants The determinants become the primary key of the new relation)

18 D. Delen MSIS 5653 – Advanced Systems Development Functional Dependencies and Primary Keys Third Normal Form (3NF) A relation is in third normal form (3NF) if it is in second normal form and there are no functional (transitive) dependencies between two (or more) nonprimary key attributes 12.17

19 D. Delen MSIS 5653 – Advanced Systems Development Functional Dependencies and Primary Keys Foreign Key An attribute that appears as a nonprimary key attribute in one relation and as a primary key attribute (or part of a primary key) in another relation SALES1(Cust_ID, Cust_Name, Salesperson) SPERSON(Salesperson, Name) Referential Integrity An integrity constraint specifying that the value (or existence) of an attribute in one relation depends on the value (or existence) of the same attribute in another relation 12.18

20 D. Delen MSIS 5653 – Advanced Systems Development Transforming E-R Diagrams into Relations It is necessary to transform the conceptual data models into a set of normalized relations Steps Represent entities Represent relationships Normalize the relations Merge the relations 12.19

21 D. Delen MSIS 5653 – Advanced Systems Development Transforming E-R Diagrams into Relations Represent Entities Each regular entity is transformed into a relation The identifier of the entity type becomes the primary key of the corresponding relation 12.20 CUSTOMER(Customer_ID, Name, Address, City_State_ZIP, Discount)

22 D. Delen MSIS 5653 – Advanced Systems Development Transforming E-R Diagrams into Relations Represent Relationships Binary 1:N Relationships  Add the primary key attribute (or attributes) of the entity on the “one” side of the relationship as a foreign key in the relation on the “many” side of the relationship  The one side migrates to the many side Binary or Unary 1:1  Three possible options a.Add the primary key of A as a foreign key of B b.Add the primary key of B as a foreign key of A c.Both of the above 12.21

23 D. Delen MSIS 5653 – Advanced Systems Development Representing a 1:N Relationship

24 D. Delen MSIS 5653 – Advanced Systems Development Transforming E-R Diagrams into Relations Represent Relationships (continued) Binary and Higher M:N relationships  Create another relation and include primary keys of all relations as primary key of new relation Unary 1:N Relationships  Relationship between instances of a single entity type  Utilize a recursive foreign key A foreign key in a relation that references the primary key values of that same relation Unary M:N Relationships  Create a separate relation  Primary key of new relation is a composite of two attributes that both take their values from the same primary key 12.23

25 D. Delen MSIS 5653 – Advanced Systems Development Representing an M:N Relationship

26 D. Delen MSIS 5653 – Advanced Systems Development Unary Relationships EMPLOYEE(Emp_ID, Name, Birthdate, Manager_ID) ITEM(Item_Number, Name, Cost) ITEM-BILL(Item_Number, Component_Number, Quantity)

27 D. Delen MSIS 5653 – Advanced Systems Development 12.26 Summary: E-R to Relation Transformation

28 D. Delen MSIS 5653 – Advanced Systems Development Merging Relations (View Integration) Purpose is to remove redundant relations EMPLOYEE1(Emp_ID, Name, Address, Phone) EMPLOYEE2(Emp_ID, Name, Address, Jobcode, Start_Date) EMPLOYEE(Emp_ID, Name, Address, Phone, Jobcode, Start_Date) View Integration Problems Synonyms  Two different names used for the same attribute  When merging, get agreement from users on a single, standard name Homonyms  A single attribute name that is used for two or more different attributes  Resolved by creating a new name Dependencies between nonkeys Dependencies may be created as a result of view integration In order to resolve, the new relation must be normalized 12.27

29 D. Delen MSIS 5653 – Advanced Systems Development Physical File and Database Design The following information is required Normalized relations, including volume estimates Definitions of each attribute Descriptions of where and when data are used, entered, retrieved, deleted and updated (including frequencies) Expectations or requirements for response time and data integrity Descriptions of the technologies used for implementing the files and database 12.28

30 D. Delen MSIS 5653 – Advanced Systems Development Designing Fields Field The smallest unit of named application data recognized by system software Each attribute from each relation will be represented as one or more fields Choosing data types Data Type  A coding scheme recognized by system software for representing organizational data Four objectives  Minimize storage space  Represent all possible values of the field  Improve data integrity of the field  Support all data manipulations desired on the field Calculated fields  A field that can be derived from other database fields 12.29

31 D. Delen MSIS 5653 – Advanced Systems Development Methods of Controlling Data Integrity Default Value A value a field will assume unless an explicit value is entered for that field Range Control Limits range of values which can be entered into field Referential Integrity An integrity constraint specifying that the value (or existence) of an attribute in one relation depends on the value (or existence) of the same attribute in another relation Null Value A special field value, distinct from 0, blank, or any other value, that indicates that the value for the field is missing or otherwise unknown 12.30

32 D. Delen MSIS 5653 – Advanced Systems Development Designing Physical Tables Relational database is a set of related tables Physical Table A named set of rows and columns that specifies the fields in each row of the table Design Goals Efficient use of secondary storage (disk space)  Disks are divided into units that can be read in one machine operation  Space is used most efficiently when the physical length of a table row divides close to evenly with storage unit Efficient data processing  Data are most efficiently processed when stored next to each other in secondary memory 12.31

33 D. Delen MSIS 5653 – Advanced Systems Development Designing Physical Tables Denormalization The process of splitting or combining normalized relations into physical tables based on affinity of use of rows and fields Partitioning  Capability to split a table into separate sections  Oracle 8i implements three types Range Hash Composite Optimizes certain operations at the expense of others 12.32

34 D. Delen MSIS 5653 – Advanced Systems Development Denormalization

35 Designing Physical Tables Denormalization Three common situations where denormalization may be used 1. Two entities with a one-to-one relationship STUDENT(StudentID, CampusAddress, ApplicationID) APPLICATION(ApplicationID, ApplicationDate, Qualifications, StudentID) =STUDENT(StudentID, CampusAddress, ApplicationDate, Qualifications) 2. A many-to-many relationship with nonkey attributes 3. Reference data STORAGE(InstructionID, WhereStore, ContainerType) ITEM(ItemID, Description, InstructionID) =ITEM(ItemID, Description, WhereStore, ContainerType) 12.34

36 D. Delen MSIS 5653 – Advanced Systems Development Designing Physical Tables Arranging Table Rows (a.k.a. file organization) Physical File  A named set of table rows stored in a specific section of secondary memory Depending on database management software utilized …  each table may be a physical file, or  whole database may be one file 12.35

37 D. Delen MSIS 5653 – Advanced Systems Development Designing Physical Tables File Organization A technique for physically arranging the records of a file Objectives for choosing file organization 1.Fast data retrieval 2.High throughput for processing transactions 3.Efficient use of storage space 4.Protection from failures or data loss 5.Minimizing need for reorganization 6.Accommodating growth 7.Security from unauthorized use 12.36

38 D. Delen MSIS 5653 – Advanced Systems Development Designing Physical Tables Types of File Organization Sequential  The rows in the file are stored in sequence according to a primary key value  Updating and adding records may require rewriting the file  Deleting records results in wasted space Indexed  The rows are stored either sequentially or non-sequentially and an index is created that allows software to locate individual rows  Index A table used to determine the location of rows in a file that satisfy some condition  Secondary Index Index based upon a combination of fields for which more than one row may have same combination of values Hashed  The address for each row is determined using an algorithm 12.37

39 D. Delen MSIS 5653 – Advanced Systems Development Types of File Organization

40 D. Delen MSIS 5653 – Advanced Systems Development 12.39 Comparing Types of File Organization

41 D. Delen MSIS 5653 – Advanced Systems Development Designing Controls for Files Backup Techniques Periodic backup of files Transaction log or audit trail Change log Data Security Techniques Coding or encrypting User account management Prohibiting users from working directly with the data. Users work with a copy which updates the files only after validation checks 12.40

42 D. Delen MSIS 5653 – Advanced Systems Development Summary Key terms Transforming E-R diagram into well- structured relations View integration Storage formats for database fields Efficient database table design Efficient use of secondary storage Data processing speed File organization Indexes 12.41

43 CHAPTER 13: Design: Designing Forms and Reports

44 D. Delen MSIS 5653 – Advanced Systems Development Learning Objectives Explain the process of designing forms and reports and the deliverables for their creation Discuss general guidelines for formatting forms and reports Use color and know when color improves the usability of information Learn how to effectively format text, tables and lists Explain how to assess usability Explain interface design guidelines unique to the design of Internet-based electronic commerce systems 13.43

45 D. Delen MSIS 5653 – Advanced Systems Development SDLC: Designing Form and Reports System inputs and outputs are produced at the end of the analysis phase, but not the Precise Appearance Forms and reports are integrally related to DFD and E-R diagrams 13.44

46 D. Delen MSIS 5653 – Advanced Systems Development Designing Forms and Reports Key Concepts Form A business document that contains some predefined data and may include some areas where additional data are to be filled in An instance of a form is typically based on one database record Report A business document that contains only predefined data A passive document for reading or viewing data Typically contains data from many database records or transactions 13.45

47 D. Delen MSIS 5653 – Advanced Systems Development The Process of Designing Forms and Reports User-focused activity Follows a prototyping approach Construction-evaluation-refinement cycle Requirements determination Who will use the form or report? What is the purpose of the form or report? When is the report needed or used? Where does the form or report need to be delivered and used? How many people need to use or view the form or report? 13.46

48 D. Delen MSIS 5653 – Advanced Systems Development The Process of Designing Forms and Reports 13.4747 Coding Sheet

49 D. Delen MSIS 5653 – Advanced Systems Development Deliverables and Outcome Design specifications are major deliverable and contain three sections 1.Narrative overview 2.Sample design 3.Testing and usability assessment 13.4848

50 D. Delen MSIS 5653 – Advanced Systems Development Deliverables and Outcome Narrative overview Sample design Testing and usability assessment

51 D. Delen MSIS 5653 – Advanced Systems Development Formatting Guidelines for Forms and Reports General Formatting Guidelines Meaningful titles Meaningful information Balanced layout Easy navigation 13.5050

52 D. Delen MSIS 5653 – Advanced Systems Development General Formatting Guidelines for Forms and Reports Highlighting Use sparingly to draw user to or away from certain information Blinking and audible tones should only be used to highlight critical information requiring user’s immediate attention Methods should be consistently selected and used based upon level of importance of emphasized information 13.5151

53 D. Delen MSIS 5653 – Advanced Systems Development General Formatting Guidelines for Forms and Reports Color versus No-Color Benefits from Using Color Soothes or strikes the eye Accents an uninteresting display Facilitates subtle discriminations in complex displays Emphasizes the logical organization of information Draws attention to warnings Evokes more emotional reactions Problems from Using Color Color pairings may wash out or cause problems for some users Resolution may degrade with different displays Color fidelity may degrade on different displays Printing or conversion to other media may not easily translate 13.52

54 D. Delen MSIS 5653 – Advanced Systems Development General Formatting Guidelines for Forms and Reports Displaying Text Display text in mixed upper and lower case and use conventional punctuation Use double spacing if space permits. If not, place a blank line between paragraphs Left-justify text and leave a ragged right margin Do not hyphenate words between lines Use abbreviations and acronyms only when they are widely understood by users and are significantly shorter than the full text 13.53

55 D. Delen MSIS 5653 – Advanced Systems Development Displaying Text

56 D. Delen MSIS 5653 – Advanced Systems Development General Formatting Guidelines for Forms and Reports Designing tables and lists Labels  All columns and rows should have meaningful labels  Labels should be separated from other information by using highlighting  Re-display labels when the data extend beyond a single screen or page Formatting columns, rows and text  Sort in a meaningful order  Place a blank line between every five rows in long columns  Columns should have at least two spaces between them  Allow white space on printed reports for user to write notes  Use a single typeface, except for emphasis  Use same family of typefaces within and across displays and reports  Avoid overly fancy fonts 13.55

57 D. Delen MSIS 5653 – Advanced Systems Development General Formatting Guidelines for Forms and Reports Designing tables and lists (continued) Formatting numeric, textual and alphanumeric data  Right-justify numeric data and align columns by decimal points  Left-justify textual data  Break long sequences of alphanumeric data into small groups of three to four characters each (e.g., xxx-xx-xxxx) Tables versus Graphs >>> Paper versus Electronic Reports 13.56

58 D. Delen MSIS 5653 – Advanced Systems Development Line Graphs versus Bar Charts

59 D. Delen MSIS 5653 – Advanced Systems Development Assessing Usability Overall evaluation of how a system performs in supporting a particular user for a particular task Three characteristics 1.Speed 2.Accuracy 3.Satisfaction 13.58

60 D. Delen MSIS 5653 – Advanced Systems Development Assessing Usability Usability Success Factors 13.59

61 D. Delen MSIS 5653 – Advanced Systems Development Assessing Usability Usability Success Factors 13.60

62 D. Delen MSIS 5653 – Advanced Systems Development Assessing Usability Measures of Usability (User Friendliness) Time to learn Speed of performance Rate of errors Retention over time Subjective satisfaction Collection methods  Observation  Interviews  Keystroke capturing  Questionnaires 13.61

63 D. Delen MSIS 5653 – Advanced Systems Development Designing Forms and Reports for Electronic Commerce Applications General Guidelines: Common Errors Lack of content – too much graphics Nonstandard use of GUI widgets Anything that looks like advertising Bleeding-edge technology Scrolling text and looping animations Nonstandard link colors Outdated information Slow download times Fixed-formatted text Displaying long lists as long pages Lack of guidance/help for fill-in forms 13.62

64 D. Delen MSIS 5653 – Advanced Systems Development Summary Designing Forms and Reports General guidelines for designing forms and reports Formatting text, tables and lists Assessing Usability Interface design guidelines unique to the electronic commerce applications 13.63


Download ppt "CHAPTER 12: Design: Designing Databases 1.1 MSIS 5653 Advanced Systems Development Dursun Delen, Ph.D. Department of Management Oklahoma State University."

Similar presentations


Ads by Google