Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 The Information School of the University of Washington Nov 29fit100-24-forms © 2006 University of Washington More Forms INFO/CSE 100, Fall 2006 Fluency.

Similar presentations


Presentation on theme: "1 The Information School of the University of Washington Nov 29fit100-24-forms © 2006 University of Washington More Forms INFO/CSE 100, Fall 2006 Fluency."— Presentation transcript:

1 1 The Information School of the University of Washington Nov 29fit100-24-forms © 2006 University of Washington More Forms INFO/CSE 100, Fall 2006 Fluency in Information Technology http://courses.washington.edu/info100/

2 2 The Information School of the University of Washington Nov 29fit100-24-forms © 2006 University of Washington Due on Friday @ Start of Class Homework 4 Also on Friday - we will go over midterm 2 and project 2b

3 3 The Information School of the University of Washington Nov 29fit100-24-forms © 2006 University of Washington Readings and References Reading »Fluency with Information Technology Chapter 16, Case Study in Database Design References »MS Access Help files keyword “form”

4 Books Publishers Authors ISBNTitle Price IDPhone Name IDPhone Name PublisherOf ∞ 1 WrittenBy ∞∞ Recall the ERD (entity relationship diagram) from last class

5 5 The Information School of the University of Washington Nov 29fit100-24-forms © 2006 University of Washington Link one book with many authors? We DO want: »to link each book to one or more authors We DON'T want »to specify extra fields (author1, author2, author3,…) this is wasteful and limits the max number of authors »to specify each book entry several times, naming a different author in each row this duplicates all the other information about the book

6 6 The Information School of the University of Washington Nov 29fit100-24-forms © 2006 University of Washington Add a cross-reference table! Refine the design so that it includes another table that is a book-author cross reference »Each entity in the table is a single cross reference Attribute: ISBN Attribute: Author ID »Primary key becomes both Foreign keys combined Now we can break the many-to-many relationship into two 1-to-many relationships that we already know how to implement

7 7 The Information School of the University of Washington Nov 29fit100-24-forms © 2006 University of Washington Define new cross-reference entities Books Authors ISBNTitle Price IDPhone Name ∞∞ Book/Author ISBNAuthorID 11

8 8 The Information School of the University of Washington Nov 29fit100-24-forms © 2006 University of Washington book-author table

9 9 The Information School of the University of Washington Nov 29fit100-24-forms © 2006 University of Washington Define the new relationships

10 Define a query that uses the relationship Query By Example actual SQL

11 11 The Information School of the University of Washington Nov 29fit100-24-forms © 2006 University of Washington Get the new view of the data Notice that this view has redundant data »That's okay, because we are not storing it this way, just presenting it »The redundant items (Alex, Another Press) came from a single entry in a table – they are guaranteed to be identical

12 Books Publishers Authors ISBNTitle Price IDPhone Name IDPhone Name PublisherOf ∞ 1 WrittenBy ∞∞ Now we've implemented this entire schema.

13 View: All Books from “Another Press”

14 14 The Information School of the University of Washington Nov 29fit100-24-forms © 2006 University of Washington View: All Books by Alex

15 View: All info about a given ISBN

16 16 The Information School of the University of Washington Nov 29fit100-24-forms © 2006 University of Washington Views as Tables Recall that the result of a query is a table We have been presenting the table to the user in simple tabular form

17 17 The Information School of the University of Washington Nov 29fit100-24-forms © 2006 University of Washington But tables are not pretty … Users need help understanding what they are looking at and what they can do with it

18 18 The Information School of the University of Washington Nov 29fit100-24-forms © 2006 University of Washington Front end and Back end Front end »We present the data to the user with some sort of Graphical User Interface Simple tabular display as we have been doing MS Access provides Forms and Reports for GUIs Web pages Back end »The database stores the data in tables »We use queries to construct new "virtual" tables or views

19 19 The Information School of the University of Washington Nov 29fit100-24-forms © 2006 University of Washington Forms A form is primarily used to enter or display data in a database The designer controls what it looks like and how it works, so it can be tailored to specific needs

20 20 The Information School of the University of Washington Nov 29fit100-24-forms © 2006 University of Washington A Form is just a Face for a table The form lets the designer arrange the data, label it, provide some control over events, etc »the presentation »multiple presentations are possible depending on the specific needs of each user Underlying data comes from a table or a query »the content »single source of data ensures consistency

21 21 The Information School of the University of Washington Nov 29fit100-24-forms © 2006 University of Washington How does a form get built? The Form wizard can help get you started.

22 But you probably want to tweak it … Design

23 23 The Information School of the University of Washington Nov 29fit100-24-forms © 2006 University of Washington But forms are not very compact … Users like to have reports densely packed with information and logically arranged …

24 24 The Information School of the University of Washington Nov 29fit100-24-forms © 2006 University of Washington Reports A Report is another face for a table (or query) The report lets the designer arrange the data, label it, provide some control over events, etc »the presentation »multiple presentations are possible depending on the specific needs of each user Underlying data comes from a table or a query »the content »single source of data ensures consistency

25 25 The Information School of the University of Washington Nov 29fit100-24-forms © 2006 University of Washington How does a report get built? The New Report wizard can build a complete report for you.

26 26 The Information School of the University of Washington Nov 29fit100-24-forms © 2006 University of Washington But this wizard is kind of naïve …

27 You might want to use the Report Wizard instead since it gives you more control.

28 Better looking report, but you still probably want to tweak it …

29 But you probably want to tweak it …

30

31 31 The Information School of the University of Washington Nov 29fit100-24-forms © 2006 University of Washington Explore the Design capabilities Properties of the various controls can be set Controls and labels can be moved around Images and patterns can be applied Totals, averages, subtotals etc can be calculated Information can be grouped by selected fields Etc, etc – there is a lot of flexibility in how these reports get generated

32 32 The Information School of the University of Washington Nov 29fit100-24-forms © 2006 University of Washington Questions Suppose I wanted a database to run a wine review web site. »What would some entities be? »What would some attributes be of those entities?

33 33 The Information School of the University of Washington Nov 29fit100-24-forms © 2006 University of Washington Questions In our wine review web site, what would the relationship be between a particular bottle of wine and the wine maker? »1 to 0 »1 to 1 »1 to many »many to many

34 34 The Information School of the University of Washington Nov 29fit100-24-forms © 2006 University of Washington Questions If we had two tables: WINE and WINE_MAKER and the schema looked like this: »WINE: wine_id, wine_name, wine_type »WINE_MAKER: maker_id, maker_name, city, phone Which table will take which primary key as a foreign key to build this relationship? Remember the relationship is: 1 WINE_MAKER to many WINE

35 35 The Information School of the University of Washington Nov 29fit100-24-forms © 2006 University of Washington Questions Can I create two different forms that update the same information? Explain why this is/is not possible.


Download ppt "1 The Information School of the University of Washington Nov 29fit100-24-forms © 2006 University of Washington More Forms INFO/CSE 100, Fall 2006 Fluency."

Similar presentations


Ads by Google