I N D I V I D U A L E X E R C I S E S |
HANDS-ON #1: Temporary tables |
Your project is complete and now you are ready to start testing. Your application reads data from one table, processes portions of the data and makes some changes, then inserts the changed data into two additional tables before committing the work. Errors are captured in an external SPOOL file for evaluation and aid in debugging after each test of the application. The process of checking the errors, recording the data, and then deleting the records before the next test run of the application is somewhat time-consuming. The notion of creating a set of temporary tables for the output tables seems to be a good solution.
For this part of the exercise, write and execute the SQL commands to create two temporary tables.
- The first table should be named CUSTORD_TEMP and should have columns for customer name and total order amount.
- The second table should be named CUSTORDTOT_TEMP and should have columns for customer order number, total state tax, and total shipping charges.
Place and save your answers in a Word document named week5_exercise.doc. You will also have a script and output file that you will include with your other files to turn in.
HANDS-ON #2: New data types |
- The PRICE can contain fractions of a penny down to thousandths of a penny, but the whole price will always be under 1000 dollars. A column named TIME_BETWEEN will store the number of days (up to 99 days), hours, minutes, and seconds (to the hundredth of a second) between the current record and the previous record. The table is never updated; only new data is inserted. Therefore, you want to minimize the storage space saved for updates.
- Taking an average row length as 24 bytes, and an average of 12 inserted records per day, you want the table to be created with enough storage space for approximately 6 months; but at the same time, you do not want to waste unused space (try to be as exact as you can).
Related Documents
No comments:
Post a Comment