* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download review - Novella
Survey
Document related concepts
Entity–attribute–value model wikipedia , lookup
Microsoft SQL Server wikipedia , lookup
Oracle Database wikipedia , lookup
Ingres (database) wikipedia , lookup
Open Database Connectivity wikipedia , lookup
Extensible Storage Engine wikipedia , lookup
Concurrency control wikipedia , lookup
Functional Database Model wikipedia , lookup
Microsoft Access wikipedia , lookup
Versant Object Database wikipedia , lookup
Relational model wikipedia , lookup
Clusterpoint wikipedia , lookup
Database model wikipedia , lookup
Transcript
Access 2002 What We Have Learned Chapter 4 REVIEW Chapter 4 deals with some of the critical issues that go into way a database is actually used in production. Once users have begun to depend upon their database, they find that there are new questions that questions that need to be asked of the data. No matter how good the original design, changes must take place and this chapter has dealt with adding, modifying, and deleting fields. In addition, the data that enters the database should be as “clean” as possible. Input masks and table lookups can assist the user in entering the correct data the first time. Finally, it is important that preventative maintenance be performed on the database. The database needs to be backed up on a regular basis. Compression of the database should be done regularly to assure that the database is performing as efficiently as possible. In the situation where the database is damaged somehow, the user has to be able to repair the damage. Arthur R. Buss Access 2002 ACWL 4.1 <Au 1st draft> 6/28/2017 Access 2002 What We Have Learned Chapter 4 QUESTIONS: 1. What are some uses of compound queries? Discussion 2. Differentiate among the conditional operators Between, In, and Like? Discussion 3. Differentiate among the logical operators And, Or, and Not? Discussion 4. What is the purpose of a Crosstab Query? Discussion 5. How does a Memo field differ from a Text field? Discussion 6. Under what circumstances would one use a Lookup field? Discussion 7. What is the purpose of an Input Mask? Discussion 8. Why is Compacting a Database useful? Discussion 9. Under what circumstances should you consider Repairing a database? Discussion 10. Under what circumstances would it be necessary to convert a database to Access2002? When should you not convert a database? If you do not convert an older version of the database, what limitations do you face? Discussion Arthur R. Buss Access 2002 ACWL 4.2 <Au 1st draft> 6/28/2017 Access 2002 What We Have Learned Chapter 4 Discussion for Question 1 Compound queries allow the user to use several conditions in seeking data. Thus, complex queries can be generated. These queries can serve as the basis for sophisticated reports. The user can develop the analysis in the form of a query and then create the report from the query. The Reports Wizard has analysis tools of its own, but more sophistication can be achieved if the data is pre-processed through a query. Return to Questions. Discussion for Question 2 Like, In, and Between are all conditional operators and allow more capability than the simple Less Than, Greater Than, and Equal To operators. Each of the new operators provides for a range of possible answers. The Between operator defines both an upper and lower limit to a range of values. It is an expansion on the >, <, and = operators. In effect, the user can specify that the value must be greater than some value and less than another value. The In operator allows the user to establish a set of requested values. If the value can be found in that set, it will be returned. Having a set of values allows great flexibility in what data is to be returned. The Like operator allows retrieval based on partial conditions. This operator can be very useful for narrowing down a search and providing candidates for the desired record. Return to Questions. Discussion for Question 3 And, Or, and Not are logical operators. They are used to combine multiple conditions together to create a complex expression. And is the most restrictive of these operators. Both sides of the Arthur R. Buss Access 2002 ACWL 4.3 <Au 1st draft> 6/28/2017 Access 2002 What We Have Learned Chapter 4 condition must be true for the entire expression to be true. The Or operator considers the entire expression to be true if both sides are true or either side is true. Only if both sides of the expression are false does the Or operator treat the condition as false. Return to Questions. Discussion of Question 4 Crosstab queries allow the analysis and summarization of a value across two variables. The Crosstab query can add, count, find an average, and summarize data in several other ways. All of this serves to provide sophisticated analysis tools for the user. Return to Questions. Discussion of Question 5 Both Text and Memo fields contain words and letters rather than numbers. However, Text fields have a fixed length. This limitation means that only a limited number of characters can be entered into the field. On the other hand, Memo fields have a variable length. Therefore, any number of characters can be entered into a Memo field. However, Memo fields cannot be readily searched. Thus, you cannot perform queries based on the values in a memo field. Return to Questions. Discussion of Question 6 Lookup fields are very useful for prompting the user to enter the proper value into a field. Lookup fields allow the user to select a value from a drop-down list and by clicking make the entry. This facility reduces the amount of keying for the user and also assures that there are not keying errors in the data entry. The lookup values can come from specific values entered by the developer of the database or may come from another table in the database. Arthur R. Buss Access 2002 ACWL 4.4 <Au 1st draft> 6/28/2017 Access 2002 What We Have Learned Chapter 4 Return to Questions. Discussion of Question 7 Input masks along with lookup fields provide ways of controlling the quality of data that enters the database. A mask is a format that the user can follow in entering data. Masks can also limit the actual type of data that can be entered, and can specify how many characters have to be entered. Return to Questions. Discussion of Question 8 Compacting a database means that unnecessary entries are removed and the remaining items are reorganized into a smaller space on the hard disk. Compacting, therefore, makes more efficient use of disk storage and also helps the database to run faster. Compacting should be done on a regular basis for databases that have high utilization and where a lot of maintenance is performed on the records. Deleted database records are not removed immediately and consequently the database must work around them. Compacting the database removes deleted records and updates the indexes. Return to Questions. Discussion of Question 9 Under some circumstances the files in a database may become corrupted. Corrupted files, at worst may not be accessible at all, and at best can produce strange results. One common occurrence which may corrupt files is when a power failure causes the hardware to shut down before the database can be closed properly. Under such circumstances the open transactions may not be stored properly in the database and indexes may not be properly updated. Arthur R. Buss Access 2002 ACWL 4.5 <Au 1st draft> 6/28/2017 Access 2002 What We Have Learned Chapter 4 Access is sometimes able to detect when the database needs to be repaired. You should certainly choose to have the repairs made under this circumstance. Compacting the database also includes making repairs. Therefore, if there is a procedure in place to regularly compact the database, this should also take care of any file corruption that is necessary. One should not rely entirely on the repair process to keep databases safe from corruption. In some cases, the damage may be so severe it cannot be repaired. Therefore, there should be a plan for making backup copies of the database on a regular basis. Return to Questions. Discussion of Question 10 Access databases have been improved over the years to incorporate additional features and performance characteristics. As a result, Microsoft has had to change the file formats of the Access tables. Microsoft has attempted to keep the new versions of Access compatible with the older versions. This relationship is one-way, however. The newer versions of Access can process databases in older formats, but, the older versions of Access cannot process the newer formats. Thus, there can be a dilemma when a database needs to be processed by users with differing versions of Access. The database files must be maintained in the earliest version currently being used. The additional capabilities possessed by the newer versions are not available when this situation occurs. When the capabilities and performance characteristics of Access 2002 are critical, the databases should be converted to that format. The negative aspect is that all users must upgrade their Access software as well. Return to Questions. Arthur R. Buss Access 2002 ACWL 4.6 <Au 1st draft> 6/28/2017 Access 2002 What We Have Learned Chapter 4 PRACTICE EXERCISE We want to use the power of Access to provide Joe with the information he needs. In the Getting Started section you modified the database to add a Fruit Type to the Fruit Table. We are going to take advantage of that field to build Crosstab queries. Building a Total Profit Crosstab Query 1. Make sure Fruit-M-N.mdb is open and located in the Queries object. 2. Click New and select the Crosstab Query Wizard 3. Set the Inventory query as the base table for this query. See Figure ACWL04.1? Figure ACWL04. 1 Establishing the Base for a Crosstab Query 4. Click Next. Select Fruit Type for Row Headers. Arthur R. Buss Access 2002 ACWL 4.7 <Au 1st draft> 6/28/2017 Access 2002 What We Have Learned Chapter 4 5. Click Next. Select Vendor Name for Column Headers as in Figure ACWL04.2. Figure ACWL04. 2 Setting Row and Column Headers Arthur R. Buss Access 2002 ACWL 4.8 <Au 1st draft> 6/28/2017 Access 2002 What We Have Learned Chapter 4 6. Click Next. Select Total Value as the calculated field and Sum the values. Your screen should look like Figure ??. Figure ACWL04. 3 Establishing the Sum of TotalValue for the Calculated Fields 7. Click Next. Name the query Total Value Crosstab. Click Finish. The results of the query should look like Figure ACWL04.4. Figure ACWL04. 4 Results of the TotalValue Crosstab Query Arthur R. Buss Access 2002 ACWL 4.9 <Au 1st draft> 6/28/2017 Access 2002 What We Have Learned Chapter 4 Building a Profit Crosstab Query. You should have enough information to build a Profit crosstab query on your own. Follow the procedure described for the Total Value Query. However, this time use VendorName for the Row Headers and FruitType for the Column Headers. Sum the Profit field. The result of your query should look like Figure ACWL04.5. Figure ACWL04. 5 Results of Profit Crosstab Query Building Reports for the Crosstab Queries. Joe would like to see the crosstab information in the form of printed reports rather than just the table format. We will step through the report wizard for the first report and you can build the second report on your own. 1. Open the Fruit-M-N.mdb database in the Reports Object. 2. Created a new report using the Report Wizard. Use Total Value Crosstab as the base table for the report. Arthur R. Buss Access 2002 ACWL 4.10 <Au 1st draft> 6/28/2017 Access 2002 What We Have Learned Chapter 4 3. Select all fields into the report. At this point, your work should look like Figure ACWL04.6. Figure ACWL04. 6 Selecting Fields from a Crosstab Query for a Report Arthur R. Buss Access 2002 ACWL 4.11 <Au 1st draft> 6/28/2017 Access 2002 What We Have Learned Chapter 4 4. Click Next and select Fruit Type as the grouping level. The resulting window should look like Figure ACWL04.7. Figure ACWL04. 7 Adding FruitType as a Grouping Level for the Report 5. Click Next and then Summary Options. Select Sum for all of the fields and Show the Summary Only. The results should look like Figure ACWL04.8. Click OK to return to Arthur R. Buss Access 2002 ACWL 4.12 <Au 1st draft> 6/28/2017 Access 2002 What We Have Learned Chapter 4 the previous window. Figure ACWL04. 8 Setting the Calculations to be Performed. Arthur R. Buss Access 2002 ACWL 4.13 <Au 1st draft> 6/28/2017 Access 2002 What We Have Learned Chapter 4 6. Click Next and change the report Orientation to Landscape. Figure ACWL04.9 shows the settings. Figure ACWL04. 9 Setting the Format of the Report 7. Click Next. Pick a style of your choosing, and then click Finsh to see the results. Arthur R. Buss Access 2002 ACWL 4.14 <Au 1st draft> 6/28/2017