Business Application Packages (11) Last time: Using Databases » Queries combining multiple tables » Mail Merge – expanding documents with query results » Practical – Seminar confirmation letters This week: » » » » » » Wrap-up of Database and Mail-Merge Mock examination Mail-Merge with Spreadsheet data Presentation Graphics Getting reports out of Excel – Pivot tables etc. Completing practicals Business Application Packages: Week 11 1 Relational Database Terms Tuple Row Red names are the formal ones, Blue are what we’ll use The whole thing is a Relation or Table 53730 28719 53550 79632 51883 36453 Jones Bill W 1 Blanagan J E 1 Lake Mary 0 Rubble Barney 1 Smith Tina 0 Thomas John 1 Prime Key Business Application Packages: Week 11 03 05 07 11 03 08 100355 101039 090952 011152 091150 110961 044 172 044 090 044 044 73 43 02 11 73 02 20000 18000 11000 50000 21000 12000 Domain Column/Field 2 Redundancy in Databases 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 Most business records do involve redundancy: Emp# 120 122 222 310 355 Name Jones Marx Able Enson Spoto Salary 20000 17500 21000 30000 29000 Project x y y z x Completion 021125 030119 030119 020922 021125 Need to get rid of this by going to Third Normal Form Business Application Packages: Week 11 3 Reducing Redundancy One approach is to look for functional dependency between fields: » Emp# and Name » Project and Completion date Can then split these between separate tables » As we did with Delegates and Seminars Employees Emp# Name Salary Project# Business Application Packages: Week 11 M 1 Project Project# Completion Project Name 4 Using the Database 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 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 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 Business Application Packages: Week 11 5 Extracting Access Data 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 Microsoft encourages use of Crystal Reports to display data from Access » Maybe that’s why the Report facility in Access is below the standard of the rest of the package » If you want to generate multi-page reports, Mail Merge may be a feasible alternative Business Application Packages: Week 11 6 Handling Customer Orders 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) 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 Business Application Packages: Week 11 7 Practice Examination 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) 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 Business Application Packages: Week 11 8 Mail-Merge from Spreadsheet 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) 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 – Set Print Area to select this range ( to bypass Word97 bug) Business Application Packages: Week 11 9 Mail-Merge from Word Document 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) 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 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 Business Application Packages: Week 11 10 Presentation Graphics You should have covered PowerPoint with Mike Davies Many tools are common to all Office Applications Example: the drawing tools » Generate vector graphics in your files (fairly economical) » Standard “autoshapes” for arrows, flowcharts » Also text boxes and “callouts” Some hints » Start with a text box – easy to change into any autoshape » But it’s hard to add text to most other drawing objects » Use “No Fill” to avoid obscuring objects behind shape (filling with white looks similar, but obscures them) » Don’t rely on fill to hide things, it fails on some printers! Business Application Packages: Week 11 11 Excel Database Practical This work all uses the Data pull-down menu » Instructions in BS1009wB.doc To create and manipulate a list of books » » » » » Open an Excel worksheet and enter the field names Type given list of books under the field names Sort the records on different fields Filter the records by various criteria Use a pivot table to display and summarize the data Business Application Packages: Week 11 12 So far we’ve covered: Introduction to the role of IT in Business » Operational, Production, Decision-support » Communications and how to get your point across » Internet publishing Word-processing » Fonts, Styles, Spell-checkers, Tables Spreadsheets » “What if” models, Excel functions, Graphical reporting Composite documents – putting things together Database » Purposes; types; flat file versus Relational databases Mail-merge » Driving Word from databases, spreadsheets and tables Business Application Packages: Week 11 13 What Else do you Need? There’ll be more about managing Information in the course, but this module is the last “skill-based” one Let’s try to list any areas omitted: » For example: – Graphics packages (CAD, image editors) – Multimedia – building/editing sound and movie clips – PC maintenance and enhancement – Fax – Statistical packages – Accounting packages – Other applications of what you already know I’ll cover any burning issues next week Business Application Packages: Week 11 14