Task 3 (Due at the end of Week 5)
Develop the SQL statements to insert records into the database. You should ensure that the data in the database is sufficient to allow for each of the reports requested by Ms. Smith to be tested. You need to show a minimum of three insert queries for each database table that you have created. Some tables will obviously require more to ensure that all of the required data is in the database (i.e., the packages table, program table, etc). To submit this task, create a comment heading called INSERT STATEMENTS in your corrected script file from Task 2. Add your INSERT statements for each table after this heading. Keep in mind that you will need to insert data into the tables in the same order that the tables were created. This will minimize any integrity constraint errors you might encounter. Keep in mind also that any values being inserted into a field defined as a foreign key field must first exist in a previous table’s primary key field. Name this file TEAM_X_TASK3.TXT, where X represents your team letter. For example, Team A would name the file TEAM_A_TASK3.TXT.
After testing your statements to verify that your data will insert into your tables, create a spooled output file with the SET ECHO ON session command set for submitting.
NOTE – Although you are only being required to have three records per table in most of your tables for this deliverable, you will need considerable more data in your tables for the final project
Terri Smith has contacted you with regard to an advertisement you had in the Age promoting your company’s expertise in database design and implementation. Ms. Smith is the Managing Director of MiniQuest, a broadcasting company based in Melbourne, Texas, that broadcasts television via cable to a six-county area in Texas. From your discussion with Ms. Smith, you have identified the following information about the company:
• MiniQuest currently has ten channels of five distinct types (2 Movie Channels, 2 News Channels, 2 Lifestyle Channels, 2 Documentary Channels, and 2 Sport Channels). Each channel shows programs on a 24-hour basis. Programs can appear on either of the two channels in a category or on both channels at any time.
• A guide (Weekly Showing) is produced that lists all the programs on each channel on a daily basis. Currently all the program scheduling for MiniQuest is done manually based on the day the program is to air and the length of the program provided by the supplier. Once this is done, the guides are produced. When the Weekly Showing guide is produced, MiniQuest finds it difficult to work out when a program finishes so that it can determine when the next program starts. The Weekly Showing guide is currently mailed to all customers, but Ms. Smith wants to e-mail it in the future to all customers (who get a free e-mail account).
• In addition to the programming problem, MiniQuest is experiencing the need to keep track of its customers in a better manner (it currently has paper cards and is doing this manually). Furious customers have been reporting that they have been getting fewer channels than they have paid for. As such, MiniQuest wants to incorporate the customer information and the programming information into one database that will produce a daily guide of shows to be sent to customers via e-mail. This guide could then be personalized to only list the shows that the customer is paying for. In addition, only those channels being paid for will be broadcast to that customer’s home.
• Ms. Smith has instigated a customer survey to determine which channel is the favorite for each customer. The result of this survey needs to be stored in the database along with the date of the survey.
• Billing information also needs to be stored in the database. This information includes the billing date (either the 1st or 15th of the month, depending on when the customer signed up), the package(s) the customer has subscribed to (this determines the channels the customer receives – see Table 1), the amount to be paid monthly (based on the package(s) subscribed to), and whether the bill has been paid. Bills are currently sent on a monthly basis. These are currently sent by mail, but will be sent via e-mail in the future.
• Ms. Smith has visions about how the system will operate on a daily basis. (This information is included so that you can get a feel for how the business operates. It should also give you some idea about how the interface would operate between the operator and your database. YOU ARE NOT REQUIRED TO CONSTRUCT AN INTERFACE FOR THIS PROJECT.)