Download presentation
Presentation is loading. Please wait.
1
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 10 Database Application Design
2
© 2002 by Prentice Hall 2 Functions of a Database Application
3
© 2002 by Prentice Hall 3 Four Basic Functions of Database Applications The four basic functions are common to all database applications These basic functions are –Create –Read –Update –Delete The (unfortunate) acronym for these functions is CRUD
4
© 2002 by Prentice Hall 4 Format/Materialize Function of a Database Application The format/materialize function of a database application involves designing the appearance of the database application
5
© 2002 by Prentice Hall 5 Enforce Constraints Function of a Database Application Database application constraints typically involve validating the format, structure, and/or values of data.
6
© 2002 by Prentice Hall 6 Provide Security and Control Function of a Database Application In that database applications provide access to many people for many purposes, the application must provide security and control functions. This helps protects the data from being seen and/or modified by unauthorized persons.
7
© 2002 by Prentice Hall 7 Execute Application Logic Function of a Database Application Database applications satisfy one or more business function. As such, the business logic must be embedded into the database application. These logic rules and procedures constitute the execute application logic function of a database application.
8
© 2002 by Prentice Hall 8 A View A view is a structured list of data attributes from the entities or semantic objects defined in the data model A view can be materialized or formatted as an on-line form or a hard-copy report
9
© 2002 by Prentice Hall 9 A View CRUD Functions – Create Create INSERT INTO CUSTOMER (CUSTOMER.Name, CUSTOMER.City) VALUES (NewCust.CUSTOMER.Name, NewCust.CUSTOMER.City)
10
© 2002 by Prentice Hall 10 A View CRUD Functions – Read Read SELECT CUSTOMER.CustomerID, CUSTOMER.Name FROM CUSTOMER, WORK WHERE CUSTOMER.CustomerID = WORK.CustomerID
11
© 2002 by Prentice Hall 11 A View CRUD Functions – Update Update INSERT INTO CUSTOMER (CUSTOMER.Name, CUSTOMER.City) VALUES (NewCust.CUSTOMER.Name, NewCust.CUSTOMER.City)
12
© 2002 by Prentice Hall 12 A View CRUD Functions – Delete Delete Cascading deletions depend on relationship cardinality
13
© 2002 by Prentice Hall 13 Form Design A form should... –Reflect the underlying structure of the view –Make data associations graphically evident –Encourage/Guide appropriate user action/response
14
© 2002 by Prentice Hall 14 Graphical User Interface (GUI) Controls Drop-down list box –A drop-down list box provides a list of items from which the user may choose Option (or radio) button –A set of option buttons allow the user to select one of a set of alternatives
15
© 2002 by Prentice Hall 15 Graphical User Interface (GUI) Controls Check box –A check box allows the user to select or deselect the option. Cursor movement/Pervasive Keys –Cursor movement defines the behavior of the cursor. The cursor should move naturally through the form.
16
© 2002 by Prentice Hall 16 GUI Example
17
© 2002 by Prentice Hall 17 Report Design The report should... –Reflect the underlying structure of the view –Handle implied objects The implied objects are those real- world objects that provide meaning and purpose to the report and to the database application
18
© 2002 by Prentice Hall 18 Enforcing Constraints within a Database Application Domain constraints Uniqueness Referential integrity constraints Relationship cardinality Business rule –Triggers
19
© 2002 by Prentice Hall 19 Uniqueness Constraint The uniqueness constraint determines if the value within the attribute must be unique for every tuple in the relation. Uniqueness is referred to as “no duplicates” within Microsoft Access
20
© 2002 by Prentice Hall 20 Referential Integrity Constraint Referential integrity defines the role and treatment of the foreign keys. For a foreign key to exist, the value of the foreign key must appear as a value in the primary key of the associated relation.
21
© 2002 by Prentice Hall 21 Relationship Cardinality Constraint Minimum relationship cardinality constraint Maximum relationship cardinality constraint
22
© 2002 by Prentice Hall 22 Minimum Relationship Cardinality Constraint The minimum relationship cardinality constraint defines whether participation in a relationship is mandatory or optional 0 = optional 1 = manditory –A fragment is a parent that does not have a required child –An orphan is a child that does not have a required parent
23
© 2002 by Prentice Hall 23 Maximum Relationship Cardinality Constraint The maximum relationship cardinality constraint defines the maximum level of participation in a relationship 1 = at most one N = zero or more
24
© 2002 by Prentice Hall 24 The Relationship Between the Minimum and Maximum Relationship Cardinality Constraints If the minimum cardinality constraint is optional (0), the maximum relationship cardinality constraint would mean: 1 = zero or one N = zero, one, or more
25
© 2002 by Prentice Hall 25 The Relationship between the Minimum and Maximum Relationship Cardinality Constraints If the minimum cardinality constraint is mandatory (1), the maximum relationship cardinality constraint would mean: 1 = one N = one or more
26
© 2002 by Prentice Hall 26 Business Rule Constraints Business rule constraints are those conditions that must be satisfied based on the rules, practices, and operating procedures of the organization.
27
© 2002 by Prentice Hall 27 Triggers Triggers are stored procedures that are invoked based on an action. –For instance a stored procedure may be invoked every time a record is added to the system.
28
© 2002 by Prentice Hall 28 Security Functions within a Database Application Typically, security exists on several levels within a database application –To log into the system, the user needs an operating system (e.g., the Windows username/password) –To log into the database, the user must supply a username and password –To execute the database application, the user must be granted access to the appropriate application files
29
© 2002 by Prentice Hall 29 Horizontal versus Vertical Security Schemes Horizontal security refers to the practice of restricting access to certain tuples in the database. –E.g., you may only see sales data in the NorthEast Vertical security refers to the practice of restricting access to certain columns in the database. –E.g., you may only see the name and address fields
30
© 2002 by Prentice Hall 30 Control Functions within a Database Application Typically control functions are introduced into database applications through menus and by defining transaction boundaries. –Using menus, the developer may control the access for a particular user. This access may change throughout a user’s session. –Transaction boundaries are defined to coordinate user actions in a multi-user environment.
31
© 2002 by Prentice Hall 31 David M. Kroenke Database Processing Eighth Edition Chapter 10 Database Application Design
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.