chapter 6, part 2 database system development (cont.) based on g. post, dbms: designing &...

19
Chapter 6, part 2 Database System Development (cont.) Based on G. Post, DBMS: Designing & Building Business Applications University of Manitoba Asper School of Business 3500 DBMS Bob Travica Updated 2015

Upload: stephany-cooper

Post on 16-Dec-2015

219 views

Category:

Documents


2 download

TRANSCRIPT

Chapter 6, part 2

Database System Development (cont.)

Based on G. Post, DBMS: Designing & Building Business Applications

University of ManitobaAsper School of Business

3500 DBMSBob Travica

Updated 2015

DDBB

SSYYSSTTEEMMSS

Complex Controls Used on Forms

Examples: Tab Grid Calendar Gauge Slider Spin Box

Tab

Grid

Gauge Slider Spin box

Calendar

2 of 20

DDBB

SSYYSSTTEEMMSS

Linking Forms

Customer

FirstName: Mary

LastName: Jones

Address: 123 Oaxaca Ave.

City: Los Angeles

ZipCode: 90086

Gender: Female

Age: 20

AccountBalance: $150

Sale

CustomerFirstName: MaryLastName: JonesAddress: 123 Oaxaca Ave.

Animals Purchased

Merchandise

EditEdit

Using forms for the output by linking them.

Button triggers query for the customer record

Subforms

3 of 19

DDBB

SSYYSSTTEEMMSS

Complex Inputting via Forms – Flow and Calculations

Linking via forms object collection:

Forms ! [Form Name] ! [Control]

AnimalID is passed from Animal form to

Sale form

Subtotals and subforms Calculate subtotal in subform ItemsSold Pass the result of calculation (Subtotal) to main

form Sale (Forms![MainForm]![SubForm].Form![Control])

Add more calculations on main form

(Tax, Order Total)

AnimalAnimalID

Sale=Forms!Animal!AnimalID

- - - - - - -Subtotal=Sum(Price*Quantity)

=Forms!Sale!ItemsSold.Form!Subtotal

ItemsSold

=Subtotal*[TaxRate]

Subtotal

Tax

=Subtotal+TaxOrder Total

Task: Start sale while querying an animal record.

4 of 20

DDBB

SSYYSSTTEEMMSS

Forms and Integrity

Avoid relying on forms for integrity Set integrity conditions in table definitions

Be sure to set referential integrity (relationships)

Use forms for input validation – contribution to data integrity

Main purpose of form: Use forms to increase usability of user interface (ease of use,

efficiency):

5 of 20

DDBB

SSYYSSTTEEMMSS

International Attributes

Language Character sets and punctuation marks Sorting Data formats

Date Time Metric vs. Imperial system Currency symbol and format Separators (decimal, . . .) Phone numbers

Separators International code prefix

Postal codes National ID Numbers

6 of 20

DDBB

SSYYSSTTEEMMSS

Direct Manipulation of Graphical Objects

Ease data input for end-users: Drag and drop objects (blue arrows).

Tabby

Brown Lab

Current Choices

Kennel/OrdersBird

Cat

Dog

Spider

Fish

Mammal

Reptile

7 of 20

DDBB

SSYYSSTTEEMMSS

Creating a Graphical Approach

Get the hardware. Scanners, Microphone and Sound card, Camera

Lots of disk space.

High speed processors.

Design: Add an object column to your table definition.

Avoid using graphics just for show.

Double-click, drag-and-drop as manipulation methods

8 of 20

DDBB

SSYYSSTTEEMMSS

Reports

Security concerns: Distribution lists & secure

lines Numbering each report Concealed/non-printed

content Secure printers Transmission limits Print queue controls

Core of system development Electronic, but can also be

printed on paper. Database + queries & reports

= TPS; TPS + more elaborate reports

= MIS, reports define MIS How often is report

generated? Events that trigger report?

(time - regular, by user – exception reports)

Size of report? Copies? Colors?...

9 of 20

DDBB

SSYYSSTTEEMMSS

Paper Report Terminology

Page Layout Landscape v. portrait Margins Gutter (binding space)

Typefaces Serif (Times New Roman) Sans-serif (Arial, Verdana) Fixed width

Font size common: 10-12 point

Facing pages (portrait)

guttermargins

10 of 20

DDBB

SSYYSSTTEEMMSS

Paper/Electronic Report Types: Tabular

11 of 19

DDBB

SSYYSSTTEEMMSS

Electronic Report Types: Group

Organizing report around a certain attribute Example: Column Order with associated Items

• Calculations supported 12 of 20

DDBB

SSYYSSTTEEMMSS

Electronic Report Design View

Ideas of hierarchy and

nested structuring… Report Header Page Header Group Header1

Group Header2 . . .Detail . . .

Group Footer2 Group Footer1 Page Footer Report Footer

More…

13 of 20

DDBB

SSYYSSTTEEMMSS

Electronic Report Design Terminology

Group Footer Subtotals for the group.

Page Footer Printed at the bottom of

every page--page totals or page numbers and notes.

Report Footer Printed one time at the end

of the report. Summary notes, overall totals and graphs for entire data set.

Report Header Title pages that are printed

one time for entire report.

Page Header Title lines or page notes that

are printed at the top of every page.

Group Header Data for a group (e.g.,

Order) and headings for the detail section.

Detail Innermost data.

More…

14 of 20

DDBB

SSYYSSTTEEMMSS

Report of Orders

Rpt footer: graph Orders by Customer

Group1: CustomerH1: Customer name, address, …

F1: Customer total orders:

Group2: OrderH2: Order#, Odate, Salesperson.

F2: Order total: Sum(Extended)

Detail: Item#, Qty, Extended

Electronic Report Design – Groups

Groups used for 1:M relationships.

Use a query to join all necessary tables. Can include all columns. Use query to create

computed columns (e.g., Extended:Price*Quantity).

Each one-to-many relationship becomes a new subgroup.

Customer(C#, Name, …) Order(O#, C#, Odate, …) OrderItem(O#, Item#, Qty, …)

15 of 20

DDBB

SSYYSSTTEEMMSS

Report Computations

Query does: Some row computations. Extended Price = Price*Quantity

Report does: Totals of grouped records. Page and report totals. Other computations: commission = rate * total Scope depends on location

Group footer: subtotalPage footer: page totalReport footer: report total

16 of 20

DDBB

SSYYSSTTEEMMSS

Graphs in Reports Graphs

Separate query needed. Detail

Locate in detail or group footer section.Avoid aggregation and groups in query. Include column that links to detail query in

report.

Subtotals and totalsTypically located in report footer or header.Compare group totalsRelies on Group By and aggregation.Be sure query groups match report groups.

17 of 20

DDBB

SSYYSSTTEEMMSS

Graphs From Queries

Build a query that generates

the data to be graphed.

Numeric data

Columns to link to form.

Summary chart--unlinked.

Sale 1

Sale 2

Sale 3

Merchandise

Merchandise

Merchandise

Animal

Animal

Animal

Total SalesMerchandise

Animals

18 of 20

DDBB

SSYYSSTTEEMMSS

Graph for Groups

19 of 19