INFO/CSE 100, Spring 2006 Fluency in Information Technology

Slides:



Advertisements
Similar presentations
JQuery MessageBoard. Lets use jQuery and AJAX in combination with a database to update and retrieve information without refreshing the page. Here we will.
Advertisements

Chapter 18 - Data sources and datasets 1 Outline How to create a data source How to use a data source How to use Query Builder to build a simple query.
1 The Information School of the University of Washington Nov 27fit databases © 2006 University of Washington Database Intro INFO/CSE 100, Fall 2006.
Introduction to Databases CIS 5.2. Where would you find info about yourself stored in a computer? College Physician’s office Library Grocery Store Dentist’s.
1 The Information School of the University of Washington Nov 29fit forms © 2006 University of Washington More Forms INFO/CSE 100, Fall 2006 Fluency.
Relational Databases What is a relational database? What would we use one for? What do they look like? How can we describe them? How can you create one?
Microsoft Access Intro Class 1 Database Concepts.
2.3 Organising Data for Effective Retrieval
Databases and LINQ Visual Basic 2010 How to Program 1.
Relational Database Concepts. Let’s start with a simple example of a database application Assume that you want to keep track of your clients’ names, addresses,
Data-mining & Data As we used Excel that has capability to analyze data to find important information, the data-mining helps us to extract information.
Information Systems: Databases Define the role of general information systems Describe the elements of a database management system (DBMS) Describe the.
1 The Information School of the University of Washington Dec 1fit advdatabases © 2006 University of Washington Advanced Database Concepts INFO/CSE.
+ Information Systems and Databases 2.2 Organisation.
1 Chapter 20 – Data sources and datasets Outline How to create a data source How to use a data source How to use Query Builder to build a simple query.
CHAPTER 1 – INTRODUCTION TO ACCESS Aliya Farheen March 5, 2014.
Databases 101 © Dolinski What you will learn How relational databases work What are the components that make up a database How to create each component.
IST 220 – Intro to Databases Lecture 2 Touring Microsoft Access.
Microsoft Office 2013 Try It! Chapter 4 Storing Data in Access.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Address Book Application Introducing Database Programming.
CSCI 3327 Visual Basic Chapter 13: Databases and LINQ UTPA – Fall 2011.
Decision Analysis Fall Term 2015 Marymount University School of Business Administration Professor Suydam Week 10 Access Basics – Tutorial B; Introduction.
DB Implementation: MS Access Forms. MS Access Forms: Purpose Data entry, editing, & viewing data in Tables Forms are user-friendlier to end-users than.
Forms. Forms provide a more convenient user interface for such things as adding new records or editing or deleting existing records in a table. They can.
1 Database Systems Introduction to Microsoft Access Part 1.
Creating Databases for Web applications
Databases: What they are and how they work
Tutorial 1 Creating a Database
Event-Driven Programming
Visual Basic 2010 How to Program
IST 220 – Intro to Databases
Creating Custom Reports, Macros, and Switchboards
GO! with Microsoft Office 2016
Exploring Microsoft Office Access 2007
Databases Chapter 16.
Practical Office 2007 Chapter 10
Forms and Reports 09.
DATABASE CONCEPTS A database is a collection of logically related data designed to meet the information needs of one or more users Data bases are store-houses.
Physical Changes That Don’t Change the Logical Design
 2012 Pearson Education, Inc. All rights reserved.
Introduction to Microsoft Access
BASIC INFORMATION ABOUT DATABASE MANAGEMENT SOFTWARE
GO! with Microsoft Access 2016
LINQ to DATABASE-2.
Chapter 4 Relational Databases
Database Management  .
Access Database for CIS17
DB Implementation: MS Access Forms
Introduction to Ms-Access Submitted By- Navjot Kaur Mahi
INFO/CSE 100, Spring 2005 Fluency in Information Technology
MODULE 7 Microsoft Access 2010
INFO/CSE 100, Spring 2005 Fluency in Information Technology
DB Implementation: MS Access Forms
Databases and Information Management
Access Database for CIT12
Introduction to Database Programs
Chapter 1 Databases and Database Objects: An Introduction
Microsoft Office Access 2003
Database Design Hacettepe University
Advanced Database Concepts: Reports & Views
From and Report.
Spreadsheets, Modelling & Databases
Introduction to Access
Exploring Microsoft Office Access 2010
INFO/CSE 100, Spring 2006 Fluency in Information Technology
Chapter 3 Database Management
Introduction to Database Programs
Guidelines for Microsoft® Office 2013
Exploring Microsoft® Office 2016 Series Editor Mary Anne Poatsy
Presentation transcript:

INFO/CSE 100, Spring 2006 Fluency in Information Technology More Forms INFO/CSE 100, Spring 2006 Fluency in Information Technology http://www.cs.washington.edu/100 1/15/2019 fit100-24-forms © 2006 University of Washington

Readings and References Fluency with Information Technology Chapter 16, Case Study in Database Design References MS Access Help files keyword “form” 1/15/2019 fit100-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 1/15/2019 fit100-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 No primary key Now we can break the many-to-many relationship into two 1-to-many relationships that we already know how to implement 1/15/2019 fit100-24-forms © 2006 University of Washington

Define new cross-reference entities Price Name ISBN Title ID Phone 1 ∞ ∞ 1 Books Book/Author Authors ISBN AuthorID 1/15/2019 fit100-24-forms © 2006 University of Washington

fit100-24-forms © 2006 University of Washington book-author table 1/15/2019 fit100-24-forms © 2006 University of Washington

Define the new relationships 1/15/2019 fit100-24-forms © 2006 University of Washington

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

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 1/15/2019 fit100-24-forms © 2006 University of Washington

Now we've implemented this entire schema. Price Name ISBN Title ID Phone ∞ WrittenBy ∞ Books Authors ∞ PublisherOf 1 Now we've implemented this entire schema. Publishers ID Phone Name

View: All Books from “Another Press”

fit100-24-forms © 2006 University of Washington View: All Books by Alex 1/15/2019 fit100-24-forms © 2006 University of Washington

View: All info about a given ISBN

fit100-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 1/15/2019 fit100-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 1/15/2019 fit100-24-forms © 2006 University of Washington

fit100-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 1/15/2019 fit100-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 1/15/2019 fit100-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 1/15/2019 fit100-24-forms © 2006 University of Washington

How does a form get built? The Form wizard can help get you started. 1/15/2019 fit100-24-forms © 2006 University of Washington

But you probably want to tweak it … Design

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 Event handlers can be written just like on HTML pages with onClick, etc these are written in Basic, not JavaScript 1/15/2019 fit100-24-forms © 2006 University of Washington

fit100-24-forms © 2006 University of Washington Displaying an image In general, images are not stored directly in the database This would mean copying the image and storing it as part of the database file The resulting database is very big The image files are not available outside of the database program But we can easily store a link to the image file a text field containing the path to the image file use the path to find, load, and display the image 1/15/2019 fit100-24-forms © 2006 University of Washington

fit100-24-forms © 2006 University of Washington Simple Display Form ImagePaths table 1/15/2019 fit100-24-forms © 2006 University of Washington

To display a linked image Create a form based on a table or query that includes the path attribute include a text field on the form to hold the path Create an image control on the form this is where the image is actually displayed Create event handlers to load the image when something changes associated with the form event OnCurrent associated with the text field event AfterUpdate 1/15/2019 fit100-24-forms © 2006 University of Washington

text field that holds the value of the primary key for the ImagePaths table, the ID attribute text field that holds the value of the attribute ImagePath image field that displays the image pointed to by ImagePath

How do we change the image? Event Handlers then click here double click here to get this 1/15/2019 fit100-24-forms © 2006 University of Washington

OnCurrent event handler for the form ImagePath is the name of the text field that holds the path to the image on your form. ImageFrame is the name of the Image control that displays the image on your form.

2.click the properties button 1. select the text field that holds the path 3.click the code generator button

AfterUpdate event handler for the field ImagePath is the name of the text field that holds the path to the image on your form. ImageFrame is the name of the Image control that displays the image on your form.

fit100-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 1/15/2019 fit100-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 … … so we developed Forms for controlling the display of data for the user who is reviewing or updating specific records. 1/15/2019 fit100-24-forms © 2006 University of Washington

Views as Forms A form is primarily used to enter or display data in a database Last lecture we developed Forms for better display to the user while updating the table. 1/15/2019 fit100-24-forms © 2006 University of Washington

But forms are not very compact … Users like to have reports densely packed with information and logically arranged … So this lecture we will develop Reports for compact display of multiple records. 1/15/2019 fit100-24-forms © 2006 University of Washington

fit100-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 1/15/2019 fit100-24-forms © 2006 University of Washington

How does a report get built? The New Report wizard can build a complete report for you. 1/15/2019 fit100-24-forms © 2006 University of Washington

But this wizard is kind of naïve … 1/15/2019 fit100-24-forms © 2006 University of Washington

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

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

But you probably want to tweak it …

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 1/15/2019 fit100-24-forms © 2006 University of Washington

entity-relationship diagram for Library database Price Name ISBN Title ID Phone ∞ WrittenBy ∞ Books Authors ∞ PublisherOf 1 Publishers entity-relationship diagram for Library database Books, Publishers, Authors are tables Price, ISBN, Title are attributes of the table Books There is a relationship between Books and Publishers 1 Publisher can have many Books ID Phone Name