Question
Write a CREATE statement to create your own table CATEGORY_CODE(CODE, DESC, AGE_FROM, AGE_TO) . Your create statement should declare the following constraints: CODE is the
Write a CREATE statement to create your own table
CATEGORY_CODE(CODE, DESC, AGE_FROM, AGE_TO) . Your create statement should declare the following constraints: CODE is the primary key, DESC is unique, AGE_FROM and AGE_TO do not allow NULLs and AGE_FROM < AGE_TO. This table is used for the age categories, for example, child (coded as C) is a category of age between 0 and 12 years. Insert the data using insert statements (use the data below).
The following Data warehouse already exists:
Time (Time_id, Month, Year)
Customer_Demographics (Dem_id, age_group, min_age, max_age, Gender)
Facts (Time_id, Dem_id, Total_Sales_Amount, No_of_books_sold)
1. Write an SQL query to list two totals: books purchased by (1) 12 years old girls and (2) 12 years boys.
2. Using the data warehouse above, add the third dimension (table) for the categories of the books. Write SQL to add the new table (columns and primary key) and any other modifications to the data warehouse.
3. What is the difference between data archiving and data backup?
5. Using your modified data warehouse, write SQL query to list total number of "computing science" books ordered by females in 2000.
6. Discuss the following characteristics of the data in a data warehouse:
a. Time-variant
b. Non-volatile
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started