0% found this document useful (0 votes)
117 views11 pages

Draw Schema

Uploaded by

Mohamed Kadry
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
117 views11 pages

Draw Schema

Uploaded by

Mohamed Kadry
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Suppose that a data warehouse consists of the three dimensions time, doctor,

and patient, and the two measures count and charge, where charge is the fee
that a doctor charges a patient for a visit. a. Draw a schema diagram for the
above data warehouse using one of the schemas. [star, snowflake, fact
constellation] b. Starting with the base cuboid [day, doctor, patient], what
specific OLAP operations should be performed in order to list the total fee
collected by each doctor in 2004? c. To obtain the same list, write an SQL query
assuming the data are stored in a relational database with the schema fee (day,
month, year, doctor, hospital, patient, count, charge)
Suppose that a data warehouse for Big-University consists of the following four
dimensions: student, course, semester, and instructor, and two measures count
and avg_grade. When at the lowest conceptual level (e.g., for a given student,
course, semester, and instructor combination), the avg_grade measure stores
the actual course grade of the student. At higher conceptual levels, avg_grade
stores the average grade for the given combination. a. Draw a snowflake schema
diagram for the data warehouse b. Starting with the base cuboid [student,
course, semester, instructor], what specific OLAP operations (e.g., roll-up from
semester to year) should one perform in order to list the average grade of CS
courses for each BigUniversity student
Consider a data warehouse for hotel occupancy, where there are four
dimensions namely (a) Hotel (b) Room (c) Time (d) Customer and two
measures (i) Occupied rooms (ii) Vacant rooms. Draw star schema and
Snowflake Schema.
Design a data warehouse for a regional weather office. The weather office has about
1,000 probes, which are scattered throughout various land and ocean locations in the
region to collect basic weather data, including air pressure, temperature includes the
temp air and the measurement unit which could be (Celsius, Fahrenheit and kelvin ),
and precipitation of rain fall at each hour. All data are sent to the central station, which
has collected such data for over 10 years until now. Draw a snow flake schema for this
study. Your design should facilitate efficient querying and on-line analytical processing,
and derive general weather patterns in multidimensional space.
Consider the following situation: Shipping costs can vary, even for the same item,
depending on the inventory warehouse from which the product is shipped. Therefore, for
each sale, the data warehouse must store the sales amount, units sold and shipping
cost for the specific product, vendor and warehouse combination of that specific sale.
The following attributes are being stored in the data warehouse for each sale (sales
amount, unit sold, shipping cost). For each Vendor | ---|--- Vendor ID#| Vendor Name|
Vendor Type| For each Product| ---|--- Product SKU#| Product Description| Product
Category| Category Manager| |For each Warehouse| ---|--- Warehouse Key| Warehouse
Name| Street Address| City| State| Zip Code| Construct a star-schema and a snowflake
schema for this data warehouse.
Determine the keys, and construct new keys as you extract additional entities for the
snowflake schema.
Suppose that a data warehouse for Big University consists of the four dimensions
student, course, semester, and instructor, and two measures count and avg grade. At
the lowest conceptual level (e.g., for a given student, course, semester, and instructor
combination), the avg grade measure stores the actual course grade of the student. At
higher conceptual levels, avg grade stores the average grade for the given combination.
Part-a (the snowflake schema) is completed below.
The Mumbai university wants you to help design a star schema to record grades for
course completed by students. There are four dimensional tables namely
course_section, professor, student, period with attributes as follow: Course_section
Attributes: Course_ID, Section_number, Course_name, Units, Room_id, Roomcapacity.
During a given semester the college offers an average of 500 course sections. Professor
Attributes: Prof_id, Prof_name, Title, Department_id, Department_name Student
Attributes: Student_id, Student_name, Major. Each course section has an average of 60
students. Period Attributes: Semester_id, Year. The database will contain data for 30
months periods. The only fact that is to be recorded in the fact table is course grade.
Answer the following questions a. Design the star schema for this problem.
3. For a Supermarket Chain, consider the following dimensions, namely Product, store,
time, promotion. The schema contains a central fact tables sales facts with three
measures unit_sales, dollars_sales and dollar_cost. Design star schema and calculate
the maximum number of base fact table records for the values given below. Time period:
5 years Store: 300 stores reporting daily sales Product: 40,000 products in each
store(about 4000 sell in each store daily) Promotion: A sold item may be in only one
promotion in a store on a given day. Promotion: Promotion ID, Name, Type, Coupon
Type, Display Type, Start Date, End Date A sold item may be in only one proportion in a
store on a given day. (1825*300*4000*1)
4. All electronics company have department. Sales consider for dimensions namely
time, item, branch & location. The schema contain central fact tables sales with two
measures dollars_sold and unit_sold. Design star schema, snowflake schema and fact
constellation for same

5. A manufacturing company has a huge sales network. To control the sales it is divided
in the regions. Each region has multiple zones. Each zone has different cities. Each sales
person is allocated different cities. The object is to track sales figure at different
granularity levels of region. Also to count no. of products sold. Create data warehouse
schema to take into consideration of above granularity levels for region, sales person
and the quarterly, yearly and monthly sales.
Suppose that a data warehouse consists of the four dimensions, date, spectator,
location, and game, and the two measures, count and charge, where charge is the fare
that a spectator pays when watching a game on a given date. Spectators may be
students, adults, or seniors, with each category having its own charge rate. Draw a star
schema diagram for the data warehouse

You might also like