Kc7021 Assignment


Table Number of Rows



Download 274.3 Kb.
Page8/8
Date16.12.2020
Size274.3 Kb.
#54508
1   2   3   4   5   6   7   8
KC7013 Assignment 2 2020 v1
Table

Number of Rows

Customers

50,000

Countries

19

Products

10,000

Sales

10,16,271

Costs

7,87,766

Times

1,461

Promotions

501

Channels

5

Table 1: Cardinalities of SH tables (as per SH2 implementation).



Figure 3: SH Star Schema.

Usually, a star schema includes a single fact table and few dimensional tables, however, the SH schema designer identified another useful fact table called COSTS, which is linked to the TIMES and PRODUCTS dimensional tables. Figure 3 shows two fact tables: SALES and COSTS.


Implementation of SH schema

Table 2 shows the files that constitute the implementation of the SH schema using Oracle 10g/11g/12c.



File

Description


sh_cre.sql

Script for creating the base tables of the SH data warehouse.

sh_cons.sql

Script for enabling constraints.

sh_drop.sql

Script for dropping the SH schema objects.

sh_idx.sql

Script for creating indexes.

sh_pop1.sql

Script for loading data into COUNTRIES and CHANNELS tables.

sh_pop2.sql

Script for populating the TIMES dimensional table.

sh_schema_objects.sql

Script for calling other scripts e.g. sh_cre.sql for creating base tables and populating the small dimensional tables.

sh_cremv.sql

Script for creating materialized views.

sh_ext_table.sql

Script for creating an external table.

sh_main.sql

Script that calls several other scripts including e.g. sh_cremv.sql, sh_idx.sql etc.

sh_costs.sql

Script for populating the COSTS fact table.

sh_hiera.sql

Script for creating dimensional hierarchies, which are called DIMENSION in Oracle.

Table 2: Files used to implement the SH schema.

Two versions of SH schema/database


    1. The default and optimized version of the SH database is created under the SH2 user. You have read-only access to query any of the tables of SH database by prefixing any table or view name by “SH2.”, e.g., to query the contents of CHANNELS table, use:

SELECT * FROM SH2.CHANNELS;




    1. An un-optimized version of the SH database has been created under your own username DWn. You will be given a special username and password for doing this part of the assignment (i.e. an Oracle account starting with DW and followed by a number e.g. DW1, DW2, etc). Throughout this part, you MUST use this special username. However, it is assumed that you will not create any indexes on any of the tables in your own personal version of the SH until asked to do specifically. Moreover, neither materialized views (see sh_cremv.sql) nor dimensional hierarchies (see sh_hiera.sql) should be created in your version of the SH database.


Important Note
Whenever, you need to assess the performance of existing database structures (e.g., materialized view, index, dimensional hierarchies) you must refer to SH2 as above (using the “SH2.” prefix). Any new database structures that you need to create should be created under your username. Likewise, when you need to assess the performance of any new database structures that you create under your DWn username, you need to prefix all tables/views/materialised views accordingly, e.g., to query the contents of your CHANNELS table, use:
SELECT * FROM DWn.CHANNELS;
References

Lane, P. (2013) Oracle Database Data Warehousing Guide, 11g Release 2 (11.2). Part Number E25554-02. Available at:



https://docs.oracle.com/cd/E11882_01/server.112/e25554/toc.htm (Accessed: 17 January 2020).
Northumbria (2018) Quick guide to Referencing and Plagiarism. Available at: https://cragside.northumbria.ac.uk/Everyone/skillsplus/database_uploads/87.pdf (Last accessed: 11 September 2019)
Pears, R. and Shields, G. (2008) Cite them right: the essential referencing guide. Newcastle upon Tyne: Pear Tree Books. Available at: http://nuweb2.northumbria.ac.uk/library/skillsplus/loader.html?55388321 (Last accessed: 11 September 2019)
Oracle (2005a) Application Developer's Guide - Object-Relational Features 10g Release 2 (10.2). Part Number B14260-01. Available at: http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14260/toc.htm (Accessed: 17 January 2020).
Oracle (2005b) Oracle Database PL/SQL User's Guide and Reference 10g Release 2 (10.2). Available at: http://docs.oracle.com/cd/B19306_01/appdev.102/b14261/toc.htm (Accessed: 17 January 2020).


Page of

Download 274.3 Kb.

Share with your friends:
1   2   3   4   5   6   7   8




The database is protected by copyright ©ininet.org 2024
send message

    Main page