Google
Information Storage and Retrieval: August 2014

Pages

Tuesday, August 19, 2014

Use of Staging Area in Datawarehouse

Reasons for Staging data before its loaded into a datawarehouse:

1. 'Free' the source systems: Once the data has been brought to staging tables, the source systems are free for this ETL. If the load process fails, we don't have to intrude again into source tables.

2. Backup: Sometimes, due to massive data volumes, datawarehouse may not be reliably backed-up. We can easily take the backup of staging files/tables and use them if we ever need to reload the datawarehouse.

3. Auditing: The process of auditing becomes easy and straightforward using Staging tables.

Saturday, August 16, 2014

Fastest way to know if a number is power of 2

Using Bitwise operators:

Check num & (num-1) == 0. If true, the number is a power of 2 else its not.