Question

Populate the tables created in E8.1b with the data. Use the data that you used to populate the tables shown in Figure 8.42 as the basis for aggregation.

  1. use CREATE commands to create tables (Fact(s) and Dimensions tables
  2. use INSERT INTO to populate the above tables
  3. use SELECT * for each table to display the information you entered in step 2
  4. use DROP commands to erase the tables from the data warehouseCALENDAR Dimension Calendar DayOf FullDate DayOfWeek Month 1/1/2013 Tuesday 1/2/2013 Wednesday 2 Month Qtr Janua Janua Q1 Q1
0 0
Add a comment Improve this question Transcribed image text
Answer #1

1. CREATE CALENDAR (

CalendarKey INT PRIMARY KEY,

FullDate DATE,

DayOfWork VARCHAR(20),

DayOfMonth INT,

Month VARCHAR(20),

Qtr VARCHAR(2),

Year INT

);

CREATE TABLE OFFICER (

OfficerKey INT PRIMARY KEY,

OfficerID INT,

OfficerName VARCHAR(40),

OfficerRank VARCHAR(40)

);

CREATE TABLE TICKETREVENUE (

CalendarKey INT,

OfficerKey INT,

Amount DECIMAL(10, 2),

PRIMARY KEY (CalendarKey, OfficerKey),

FOREIGN KEY (CalendarKey) REFERENCES CALENDAR (CalendarKey),

FOREIGN KEY (OfficerKey) REFERENCES OFFICER (OfficerKey)

);

2. INSERT INTO CALENDAR VALUES (1, '1/1/2013', 'Tuesday', 1, 'January', 'Q1', 2013);

INSERT INTO OFFICER VALUES (1, 1, 'Joe', 'Sergeant');

INSERT INTO TICKETREVENUE (1, 1, 300);

NOTE: I have inserted only row in each table. You can refer it to insert other rows as required.

3.

SELECT * FROM CALENDAR;

SELECT * FROM OFFICER;

SELECT * FROM TICKETREVENUE;

4.

DROP TABLE CALENDAR;

DROP TABLE OFFICER;

DROP TABLE TICKETREVENUE;

Add a comment
Know the answer?
Add Answer to:
Populate the tables created in E8.1b with the data. Use the data that you used to populate the ta...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • General Requirements: • You should create your programs with good programming style and form using proper blank spaces, indentation and braces to make your code easy to read and understand; • You sho...

    General Requirements: • You should create your programs with good programming style and form using proper blank spaces, indentation and braces to make your code easy to read and understand; • You should create identifiers with sensible names; • You should make comments to describe your code segments where they are necessary for readers to understand what your code intends to achieve. • Logical structures and statements are properly used for specific purposes. Objectives This assignment requires you to write...

  • Use Java please Creating a calendar for a given year A shell for this assignment has...

    Use Java please Creating a calendar for a given year A shell for this assignment has been provided so that you can fill in the methods Homework 4 grading rubric 1. Output examples a. One Normal Year, 10% b. One Leap Year, 10% 2. Style Meaningful variable names, 10% b. Meaningful method names, 10 % c. Comments, Total: 10% . Do not comment every line. 5% . Comment non-obvious code. 5% a d. Indentation, 10% e. Block comment with name...

  • Overview This lab provides you the opportunity to insert and update data with the use of SQL comm...

    Overview This lab provides you the opportunity to insert and update data with the use of SQL commands. The lab will utilize the FLIX2YOU problem, the current schema. In order to start this lab, you must have successfully completed Lab # 6. In Lab # 6, you executed a script that was provided to you. This script created 7 of the FLIX2YOU tables as documented in the Entity Relationship Diagram in the FLIX2YOU problem document. The second part of lab...

  • explain for blanks 1-16 clearly and thoroughly, thank you(: Use the following data for the next...

    explain for blanks 1-16 clearly and thoroughly, thank you(: Use the following data for the next 13 questions. A local bank has approved a $10,000,000 construction loan at 5.5% with 0.75 points. The developer is required to contribute $3.000.000 to the project, and the bank has agreed to finance the remainder subject to the $10,000,000 limit. This project can be built very quickly - in fact in 3 months. When the construction loan is closed, the 0.75 point loan fee...

  • Please use own words. Thank you. CASE QUESTIONS AND DISCUSSION > Analyze and discuss the questions...

    Please use own words. Thank you. CASE QUESTIONS AND DISCUSSION > Analyze and discuss the questions listed below in specific detail. A minimum of 4 pages is required; ensure that you answer all questions completely Case Questions Who are the main players (name and position)? What business (es) and industry or industries is the company in? What are the issues and problems facing the company? (Sort them by importance and urgency.) What are the characteristics of the environment in which...

  • Hello, If anyone can help me I will grestly appreciate it! I will also give a...

    Hello, If anyone can help me I will grestly appreciate it! I will also give a thumbs up! Autotech Manufacturing is engaged in the production of replacement parts for automobiles. One plant specializes in the production of two parts: Part 127 and Part 234. Part 127 produces the highest volume of activity, and for many years it was the only part produced by the plant. Five years ago, Part 234 was added. Part 234 was more difficult to manufacture and...

  • Please read the article and answer about questions. You and the Law Business and law are...

    Please read the article and answer about questions. You and the Law Business and law are inseparable. For B-Money, the two predictably merged when he was negotiat- ing a deal for his tracks. At other times, the merger is unpredictable, like when your business faces an unexpected auto accident, product recall, or government regulation change. In either type of situation, when business owners know the law, they can better protect themselves and sometimes even avoid the problems completely. This chapter...

  • Hi, Kindly assist with my project management assignment below using the attached case study Question 1 Update the project charter for the remainder of the project in response to Adams’ memo (lines 241...

    Hi, Kindly assist with my project management assignment below using the attached case study Question 1 Update the project charter for the remainder of the project in response to Adams’ memo (lines 241 through 246). Question 2 Prepare a plan for the remainder of the project in response to Adams’ memo (lines 241 through 246). Your answers to the above will be assessed in terms of the level of communication displayed, the insights and inferences drawn, and your ability to...

  • CASE 20 Enron: Not Accounting for the Future* INTRODUCTION Once upon a time, there was a...

    CASE 20 Enron: Not Accounting for the Future* INTRODUCTION Once upon a time, there was a gleaming office tower in Houston, Texas. In front of that gleaming tower was a giant "E" slowly revolving, flashing in the hot Texas sun. But in 2001, the Enron Corporation, which once ranked among the top Fortune 500 companies, would collapse under a mountain of debt that had been concealed through a complex scheme of off-balance-sheet partnerships. Forced to declare bankruptcy, the energy firm...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT