Presentation is loading. Please wait.

Presentation is loading. Please wait.

Business Application Packages: Week 10 1 Business Application Packages (10) l Last Time: Databases part 2 »The Relational Model »Practical: –Forms and.

Similar presentations


Presentation on theme: "Business Application Packages: Week 10 1 Business Application Packages (10) l Last Time: Databases part 2 »The Relational Model »Practical: –Forms and."— Presentation transcript:

1 Business Application Packages: Week 10 1 Business Application Packages (10) l Last Time: Databases part 2 »The Relational Model »Practical: –Forms and Reports –Using Microsoft Access as a relational database l Week 9 Self Study: Mail-Merge l This week: »More uses of Databases »Mail Merge »Practical – putting Word and your database together

2 Business Application Packages: Week 10 2 Business Value of Computing l Business is driven by people l The computer rarely creates anything new »It can allow you to re-use work already done »Help you manage and store work for reference and reuse »Present information clearly »Simplify decision-taking by providing data and calculation l Repetitive tasks can be automated »Handling Orders »Creating bills »Spotting trends l And information made more timely »e.g. Web site showing stock position from database

3 Business Application Packages: Week 10 3 Integrating Packages l For one-off tasks, like writing a letter, a single package is sufficient l For decision-support, you often need to combine: »data, »computation, and »display l The data may be in a spread-sheet or database l Spreadsheets are good for calculation and generating graphics l Word-processors are good for laying out reports l Presentation graphics are better in front of an audience

4 Business Application Packages: Week 10 4 Mail Merge l A common process that you can automate »For example, sending a form-letter to all your customers »Integrates word-processing with data retrieval l Works by creating a “Master document” »Contains all the words and layout common to all letters »and “place holder” fields to plug in variable data l Microsoft Word will take data from various sources »Other Word documents can be rather tricky as source »Usual source is a table (database or spreadsheet) »We’ll use a database to extend our experience of Access

5 Business Application Packages: Week 10 5 Master Document l Word provides extensive help for building this l Best if you already have the source of variable data l Use Tools/Mail Merge to select the data source »Often this will be a Query combining multiple tables, like the “people attending seminars” one last week »That way you can pick fields from it »Word validates these as you go l Write the document, using “Insert Field” where you need to plug in external data »It’s best to use the Word toolbar to save pulling down the menu and typing in MergeField names »Word XP makes it easy to preview the merged result

6 Business Application Packages: Week 10 6 Mail-Merge/Database Practical l Using linked tables in Knight’s example l Problem: organizing seminars for conference delegates »Delegates’ details are held in a table »Seminar details are held in another table »Each delegate can attend one seminar (but we hope each seminar will attract many delegates!) Delegates Delegate-ref Name Company Address... Phone # Seminar-ref Seminars Seminar-ref Name From To Fee 1 M

7 Business Application Packages: Week 10 7 Seminar Confirmation Example l Start with the conference database you created l Generate a letter to each delegate confirming the seminar chosen »(see BS1009w9.doc for problem description) l You will need to extend the database first »Names will need to be restructured to avoid nasties like “Dear Marghanita Laski” »And create a query that contains fields from both tables, joined by the Seminar_ref value l Then create a suitable master document »Test it out for layout and validity, »then merge into a file to check that all letters get created

8 Business Application Packages: Week 10 8 Relational Database Terms l Red names are the formal ones, Blue are what we’ll use l The whole thing is a Relation or Table 53730Jones Bill W1031003550447320000 28719Blanagan J E1051010391724318000 53550Lake Mary0070909520440211000 79632Rubble Barney1110111520901150000 51883Smith Tina0030911500447321000 36453Thomas John1081109610440212000 Domain Column/Field Tuple Row Prime Key

9 Business Application Packages: Week 10 9 Redundancy in Databases l One of the goals of a database is to reduce redundancy »If you store a piece of information in two places, –it wastes space –and creates the risk that the copies will get out of step l Most business records do involve redundancy: Emp#NameSalaryProjectCompletion 120Jones20000x021125 122Marx17500y030119 222Able21000y030119 310Enson30000z020922 355Spoto29000x021125 l Need to get rid of this by going to Third Normal Form

10 Business Application Packages: Week 10 10 Reducing Redundancy l One approach is to look for functional dependency between fields: »Emp# and Name »Project and Completion date l Can then split these between separate tables »As we did with Delegates and Seminars Project Project# Completion Project Name Employees Emp# Name Salary Project# 1 M

11 Business Application Packages: Week 10 11 Using the Database l We often want a view of chunks of the original large table, complete with redundancy. But… »Usually only selected rows »and often only a selection of columns l So we only need to ask the DBMS to reconstruct a small part of the conceptual “joined” table »Still saves space »Guarantees integrity of data l With Access, we used Queries to do this work »SQL is the underlying language for selection/sorting »You can inspect the SQL generated by Access by using the View menu

12 Business Application Packages: Week 10 12 Extracting Access Data l Access is a cheap but powerful database tool »Lets you do most of the things expensive relational database packages can do »Has a standard interface (ODBC) to communicate with other programs »If you need to upgrade to (say) Oracle or SQL Server, ODBC helps with the migration »Designed mainly for a single user – upgrade when you need a multi-user database l The Report facility in Access has been improved in recent versions, but you may still want to use Mail Merge

13 Business Application Packages: Week 10 13 Handling Customer Orders l As we saw, most businesses need tables for: »Customer records (name, address, contact, customer-ref) »Orders (customer-ref, order-ref, date) »Order items (order-ref, product-ref, quantity) »Products (product ref, description, price) l Another example might be to confirm orders by letter »Each letter must be correctly addressed »Must list all items included in the order »Information is scattered amongst the tables »Make query from order items and orders to show all orders placed today; –each item to contain customer-ref and product description

14 Business Application Packages: Week 10 14 Practice Examination l Goal of exam is to measure parts of the course not covered in the assignment – mainly »Using Access, including building queries »Mail-merge with Word and Access A practice paper is on the Business web-site at http://cmg.wkac.ac.uk/courses/bs1009/bs1009me.doc (copy attached to the hand-out) l Starts easy, gets progressively harder »Simple modification of data in the database (be accurate) »Mail-merge from an existing table »Mail-merge from new query built on a single table ».. And from query working from two tables

15 Business Application Packages: Week 10 15 Mail-Merge from Spreadsheet l All you really need for Mail Merge is tabular data »Can come from a Database Table »Or an “on the fly” table like an Access Query »A spreadsheet »Even data from another Word document (easy with tables, hard otherwise) l An example is sending out exam results »There is a suitable data source in: http://cmg.wkac.ac.uk/courses/bs1009/mailmer2.xls »Create a Word document as basis for the letter, then open the spreadsheet as Tools/Mail Merge data source »We are interested in rows 3 to 23, columns A to M

16 Business Application Packages: Week 10 16 Mail-Merge from Word Document l The same exercise can be done purely within Word »Make sure your data is in a table (can handle non-table data, but it’s hard to get right) l Create a Data Source document »An easy way is to Copy the data from your Excel sheet »When you paste into Word, it will create a table l Now create a Master document to use the data »Probably best to start from the example built before (saving under a new name) »Go through the Mail Merge routine as usual


Download ppt "Business Application Packages: Week 10 1 Business Application Packages (10) l Last Time: Databases part 2 »The Relational Model »Practical: –Forms and."

Similar presentations


Ads by Google