Total Page Preview:   000000003255

Data warehouse Interview Questions Answers for freshers and experienced

1. What is a Fact Table?
Answer:
  •  The primary table in a dimensional model where the numerical performance measurements (or facts) of the business are stored so they can be summarized to provide information about the history of the operation of an organization.
  • We use the term fact to represent a business measure. The level of granularity defines the grain of the fact table.
 
2. What is a Dimension Table?
Answer:
  • Dimension tables are highly denormalized tables that contain the textual descriptions of the business and facts in their fact table.
  • Since it is not uncommon for a dimension table to have 50 to 100 attributes and dimension tables tend to be relatively shallow in terms of the number of rows, they are also called a wide table.
  • A dimension table has to have a surrogate key as its primary key and has to have a business/alternate key to link between the OLTP and OLAP.
 
3. What are the types of Measures?
Answer:
  • Additive: measures that can be added across all dimensions (cost, sales).
  • Semi-Additive: measures that can be added across few dimensions and not with others.
  • Non-Additive: measures that cannot be added across all dimensions (stock rates).
4 What is a Star Schema?
Answer:
  • It is a data warehouse design where all the dimensions tables in the warehouse are directly connected to the fact table.
  • The number of foreign keys in the fact table is equal to the number of dimensions. ? It is a simple design and hence faster query.
 
5. What is a Snowflake Schema?
Answer:
  • It is a data warehouse design where at least one or more multiple dimensions are further normalized. ? Number of dimensions > number of fact table foreign keys
  • Normalization reduces redundancy so storage wise it is better but querying can be affected due to the excessive joins that need to be performed.
 
6. What is granularity?
Answer:
  • The lowest level of information that is stored in the fact table. ? Usually determined by the time dimension table.
  • The best granularity level would be per transaction but it would require a lot of memory.
 
7. What is a Surrogate Key?
 
Answer:
  • It is a system generated key that is an identity column with the initial value and incremental value and ensures the uniqueness of the data in the dimension table.
  • Every dimension table must have a surrogate key to identify each record!!!
 
8. What are some advantages of using the Surrogate Key in a Data Warehouse?
Answer:
1. Using a SK, you can separate the Data Warehouse and the OLTP: to integrate data coming from heterogeneous sources, we need to differentiate between similar business keys from the OLTP. The
keys in OLTP are the alternate key (business key).
 
2. Performance: The fact table will have a composite key. If surrogate keys are used, then in the fact table, we will have integers for its foreign keys.
This requires less storage than VARCHAR.
The queries will run faster when you join on integers rather than VARCHAR.
The partitioning done on SK will be faster as these are in sequence.
 
3. Historical Preservation: A data warehouse acts as a repository of historical data so there will be various versions of the same record and in order to differentiate between them, we need a SK then we can keep the history of data.
 
4. Special Situations (Late Arriving Dimension): Fact table has a record that doesn’t have a match yet in the dimension table. Surrogate key usage enables the use of such a ‘not found’ record as a SK is not dependent on the
ETL process.
 
9. What is the datatype difference between a fact and dimension tables?
Answer:
1. Fact Tables
  1. They hold numeric data.
  2. They contain measures.
  3. They are deep.
 
2. Dimensional Tables
  1. They hold textual data.
  2. They contain attributes of their fact tables.
  3. They are wide.

10. How many types of dimension tables available in data warehouse?

 
11. What is your strategy for the incremental load?
Answer: The combination of different techniques for the incremental load in my previous projects; time stamps, CDC (Change Data Capture), MERGE statement and CHECKSUM() in TSQL, LEFT OUTER JOIN, TRIGGER, the Lookup Transformation in SSIS.
 
12. What is CDC? advantages and disadvantages.
Answer:  
CDC (Change Data Capture) is a method to capture data changes, such as INSERT, UPDATE and DELETE, happening in a source table by reading transaction log files. Using CDC in the process of an incremental  load, you are going to be able to store the changes in a SQL table, enabling us to apply the changes to a target table incrementally.
 
In data warehousing, CDC is used for propagating changes in the source system into your data warehouse, updating dimensions in a data mart, propagating standing data changes into your data warehouse and such.
 
The advantages of CDC are:
  •  It is almost real time ETL.
  •  It can handle small volume of data.
  •  It can be more efficient than replication.
  •  It can be auditable.
  •  It can be used to configurable clean up.
 
Disadvantages of CDC are:
  •  Lots of change tables and functions
  •  Bad for big changes e.g. truncate & reload Optimization of CDC:
  •  Stop the capture job during load
  •  When applying changes to target, it is ideal to use merge.
 
13. What is the difference between a connection and session ?
Answer: 
Connection: It is the number of instance connected to the database. An instance is modelized soon as the application is open again.
Session: A session run queries.In one connection, it allowed multiple sessions for one connection.
 
14. What are all different types of collation sensitivity?
Answer: Following are different types of collation sensitivity -
  • Case Sensitivity - A and a and B and b.
  • Accent Sensitivity.
  • Kana Sensitivity - Japanese Kana characters.
  • Width Sensitivity - Single byte character and double byte character.
15. What is CLAUSE?
Answer:  SQL clause is defined to limit the result set by providing condition to the query. This usually filters some rows from the whole set of records.
Example - Query that has WHERE condition Query that has HAVING condition.
 
16. What is Union, minus and Interact commands?
Answer: 
  • UNION operator is used to combine the results of two tables, and it eliminates duplicate rows from the tables.
  • MINUS operator is used to return rows from the first query but not from the second query. Matching records of first and second query and other rows from the first query will be displayed as a result set.
  • INTERSECT operator is used to return rows returned by both the queries.
17. How to select unique records from a table?
Answer:  Select unique records from a table by using DISTINCT keyword.
Select DISTINCT StudentID, StudentName from Student.
 
18. How to remove duplicate rows from table?
Answer:
Step 1: Selecting Duplicate rows from table:
Select rollno FROM Student WHERE ROWID <>
(Select max (rowid) from Student b where rollno=b.rollno);
 
Step 2: Delete duplicate rows:
Delete FROM Student WHERE ROWID <>
(Select max (rowid) from Student b where rollno=b.rollno);
 
19. How to calculate number of rows in table without using count function?
Answer: Select table_name, num_rows from user_tables where table_name=’Employee’;
Tip: User needs to use the system tables for the same. So using user_tables user will get the number of rows in the table
 
 20. What is the difference between a connection and session ?
Answer: 
Connection: It is the number of instance connected to the database. An instance is modelized soon as the application is open again.
Session: A session run queries.In one connection, it allowed multiple sessions for one connection.

Thank You

About Author

Brijesh Kumar

Database Developer

I have more then 6 years Experience in Microsoft Technologies - SQL Server Database, ETL Azure Cloud - Azure SQL Database, CosmosDB, Azure Data Factory, PowerBI, Web Job, Azure Function, Azure Storage, Web Apps, Powershall and Database Migration On-Premise to Azure Cloud.
LinkedIn : https://www.linkedin.com



Comments

Walston
16-Aug-2020
Hi to all, it's actually a pleasant for me to go to see this web site, it includes valuable Information.
Beaumont
20-Aug-2020
What's up, after reading this amazing piece of writing i am too happy to share my knowledge here with mates.
Colburn
26-Aug-2020
There is certainly a great deal to learn about this subject. I like all the points you have made.
Fraley
29-Aug-2020
Excellent write-up. I definitely appreciate this site. Stick with it!
Poff
04-Sep-2020
For the reason that the admin of this web page is working, no uncertainty very shortly it will be famous, due to its feature contents.
Roberts
26-Sep-2020
This article will help the internet users for creating new webpage or even a blog from start to end.
Brijesh Kumar
07-Sep-2016
very nice article and useful us.
McBurney
03-Oct-2020
canada drugs online https://canadianpharmacy-usx.com canadian pharmacy online
espn.com/activate
10-Dec-2019
Ask any Search Engine Optimiser, writing a blog post, no matter how good it is, won't bring you any links. Sitting tight after finishing an awesome content is the last thing that you should do, if you want to get high traffic and social shares to the blog post.
Haddon
06-Dec-2019
Good Morning everybody аt ithubcity.ⅽom, we are presently taking on neѡ reviewers who wοuld bе interested iin reviewing our CBD products ѕuch as CBD GUMMIES. If іnterested, please feel free to reach οut to me on https://www.justcbdstore.com
Duigan
15-Jan-2020
Excellent beat ! I wish to apprentice whilst you amend your site, how could i subscribe for a blog web site? The account helped me a acceptable deal. I have been a little bit acquainted of this your broadcast offered bright clear idea
Thomas
01-Dec-2019
Wⲟuld anyⲟne recommend Peaches and Screams UK (https://peachesandscreams.co.uk) fߋr saucy Christmas gifts? Ӏ гeally love tһeir Midnight Fantasy Lace Chemise Тhanks in advance :D
Boose
03-Oct-2020
rx pharmacy online https://rxpharmacyvaed.com/ pharmacy rx world
Mondalmi
05-Sep-2020
This text is worth everyone's attention. When can I find out more?
Riddoch
03-Jul-2020
I am no longer sure the place you're getting your info, however good topic. I needs to spend a while learning more or working out more. Thanks for magnificent information I was in search of this info for my mission.
Mullin
08-Jul-2020
I have to thank you for the efforts you've put in writing this site. I really hope to see the same high-grade content by you in the future as well. In fact, your creative writing abilities has motivated me to get my own website now ;)
Allard
15-Aug-2020
Greetings from Florida! I'm bored at work so I decided to check out your website on my iphone during lunch break. I enjoy the information you present here and can't wait to take a look when I get home. I'm shocked at how fast your blog loaded on my mobile .. I'm not even using WIFI, just 3G .. Anyways, wonderful site!
Salomons
19-Aug-2020
Hi there, There's no doubt that your website could possibly be having web browser compatibility problems. Whenever I look at your site in Safari, it looks fine however, if opening in Internet Explorer, it's got some overlapping issues. I just wanted to provide you with a quick heads up! Apart from that, great blog!
Hong
15-Aug-2020
Wonderful site you have here but I was curious if you knew of any user discussion forums that cover the same topics discussed in this article? I'd really like to be a part of community where I can get comments from other knowledgeable people that share the same interest. If you have any recommendations, please let me know. Many thanks!
Hannam
15-Aug-2020
Thanks very interesting blog!
Goll
26-Aug-2020
Excellent beat ! I wish to apprentice while you amend your site, how can i subscribe for a blog web site? The account aided me a acceptable deal. I had been a little bit acquainted of this your broadcast offered bright clear idea
Legg
26-Aug-2020
You have made some good points there. I looked on the internet to find out more about the issue and found most people will go along with your views on this web site.
Patton
26-Aug-2020
Thank you for some other informative website. Where else could I get that kind of info written in such a perfect way? I've a mission that I am just now working on, and I've been at the look out for such information.
Lorimer
27-Aug-2020
I've been exploring for a little for any high quality articles or blog posts on this sort of area . Exploring in Yahoo I ultimately stumbled upon this site. Reading this information So i'm satisfied to show that I've an incredibly excellent uncanny feeling I discovered exactly what I needed. I most indisputably will make sure to do not forget this web site and give it a glance on a constant basis.
Bazley
22-Feb-2021
The impactful final results of the programme can only be achieved when all components perform collectively.
Salas
02-Nov-2020
I have to thank you for the efforts you have put in penning this website. I really hope to view the same high-grade blog posts from you later on as well. In fact, your creative writing abilities has encouraged me to get my very own site now ;)
Baker
10-Jan-2021
Why visitors still make use of to read news papers when in this technological world the whole thing is available on net?
Hoke
10-Nov-2020
Heya i am for the primary time here. I found this board and I to find It really helpful & it helped me out a lot. I am hoping to give one thing again and help others such as you helped me.
Truchanas
12-Jan-2021
Pretty nice post. I just stumbled upon your blog and wished to say that I've truly enjoyed browsing your blog posts. In any case I'll be subscribing to your feed and I hope you write again very soon!
Tuckson
23-Jan-2021
Hello to all, how is everything, I think every one is getting more from this site, and your views are pleasant in favor of new people.
Wirth
26-Jan-2021
Wow that was unusual. I just wrote an really long comment but after I clicked submit my comment didn't show up. Grrrr... well I'm not writing all that over again. Regardless, just wanted to say superb blog!
Silverman
27-Jan-2021
These are actually wonderful ideas in regarding blogging. You have touched some nice things here. Any way keep up wrinting.
Silverman
27-Jan-2021
These are actually wonderful ideas in regarding blogging. You have touched some nice things here. Any way keep up wrinting.
Reginald
31-Jan-2021
If you want to obtain much from this post then you have to apply these methods to your won web site.
Vidler
10-Feb-2021
I don't even know how I ended up here, but I thought this post was good. I do not know who you are but definitely you are going to a famous blogger if you aren't already ;) Cheers!
Wittenoom
21-Mar-2021
I like what you guys are up too. Such clever work and coverage! Keep up the superb works guys I've you guys to my own blogroll.
Rumpf
15-Aug-2020
Incredible points. Sound arguments. Keep up the great effort.
Tuggle
11-Aug-2020
Regards for all your efforts that you have put in this. Very interesting info.
Butters
12-Aug-2020
We've reduced pricing on all immunity merchandise to assist our neighborhood.
Servin
05-Sep-2020
Hello, I enjoy reading through your post. I like to write a little comment to support you.
Humffray
14-Aug-2020
I'm pretty pleased to uncover this website. I need to to thank you for your time just for this wonderful read!! I definitely enjoyed every part of it and i also have you book-marked to look at new stuff on your blog.
Herington
14-Aug-2020
I am really loving the theme/design of your web site. Do you ever run into any web browser compatibility issues? A handful of my blog audience have complained about my blog not working correctly in Explorer but looks great in Chrome. Do you have any tips to help fix this issue?
Shanahan
14-Aug-2020
My brother suggested I might like this blog. He was totally right. This post actually made my day. You cann't imagine just how much time I had spent for this information! Thanks!
Eastwood
27-Aug-2020
Hmm is anyone else experiencing problems with the images on this blog loading? I'm trying to find out if its a problem on my end or if it's the blog. Any feedback would be greatly appreciated.
Hollinworth
01-Sep-2020
I simply could not depart your site before suggesting that I actually enjoyed the standard info an individual provide on your guests? Is going to be again frequently in order to check up on new posts
Biscoe
03-Sep-2020
Thanks for ones marvelous posting! I seriously enjoyed reading it, you will be a great author. I will make sure to bookmark your blog and will often come back sometime soon. I want to encourage that you continue your great posts, have a nice holiday weekend!
Morgan
05-Sep-2020
Very energetic post, I liked that bit. Will there be a part 2?
Goodsell
05-Sep-2020
Good day! I know this is kinda off topic however , I'd figured I'd ask. Would you be interested in exchanging links or maybe guest authoring a blog post or vice-versa? My website discusses a lot of the same topics as yours and I believe we could greatly benefit from each other. If you happen to be interested feel free to shoot me an e-mail. I look forward to hearing from you! Terrific blog by the way!
Colton
05-Sep-2020
I like the valuable information you provide in your articles. I'll bookmark your blog and check again here frequently. I am quite certain I will learn a lot of new stuff right here! Best of luck for the next!
Skeats
05-Sep-2020
Very great post. I simply stumbled upon your weblog and wished to mention that I've really loved surfing around your blog posts. After all I'll be subscribing on your rss feed and I am hoping you write once more soon!
Sykes
05-Sep-2020
I constantly spent my half an hour to read this web site's articles daily along with a mug of coffee.
Ashley
05-Sep-2020
Good day! Do you know if they make any plugins to assist with Search Engine Optimization? I'm trying to get my blog to rank for some targeted keywords but I'm not seeing very good success. If you know of any please share. Kudos!
Hagai
05-Sep-2020
I feel this is one of the so much important info for me. And i'm happy studying your article. However want to statement on some general issues, The web site style is wonderful, the articles is truly nice : D. Just right job, cheers
Torrence
14-Aug-2020
Heya! I'm at work surfing around your blog from my new iphone! Just wanted to say I love reading your blog and look forward to all your posts! Carry on the excellent work!
Lesina
05-Sep-2020
Wonderful blog! I found it while surfing around on Yahoo News. Do you have any tips on how to get listed in Yahoo News? I've been trying for a while but I never seem to get there! Thanks
Devlin
05-Sep-2020
certainly like your web site but you need to check the spelling on quite a few of your posts. Several of them are rife with spelling issues and I to find it very troublesome to tell the truth nevertheless I will certainly come again again.
Galarza
05-Sep-2020
I’m not that much of a internet reader to be honest but your blogs really nice, keep it up! I'll go ahead and bookmark your website to come back later on. Many thanks
Breinl
27-Aug-2020
I've read some good stuff here. Certainly value bookmarking for revisiting. I surprise how much attempt you put to create this sort of magnificent informative website.
Dilke
05-Sep-2020
Hi there, just wanted to tell you, I enjoyed this post. It was funny. Keep on posting!
Fromm
21-Mar-2021
Hi there I am so grateful I found your blog, I really found you by accident, while I was researching on Google for something else, Regardless I am here now and would just like to say kudos for a incredible post and a all round exciting blog (I also love the theme/design), I don’t have time to read through it all at the minute but I have saved it and also added your RSS feeds, so when I have time I will be back to read much more, Please do keep up the great work.
Gallardo
04-Nov-2021
What a data of un-ambiguity and preserveness of valuable know-how regarding unexpected feelings.
Sulman
09-Apr-2021
Hello there, I found your web site by way of Google even as looking for a similar topic, your website came up, it seems good. I have bookmarked it in my google bookmarks. Hello there, simply turned into aware of your weblog thru Google, and located that it's truly informative. I am gonna be careful for brussels. I'll be grateful if you happen to proceed this in future. Lots of folks shall be benefited out of your writing. Cheers!
Bingham
01-May-2021
I really like what you guys are up too. This kind of clever work and exposure! Keep up the awesome works guys I've included you guys to our blogroll.
Wilsmore
14-May-2021
Someone essentially lend a hand to make significantly articles I would state. That is the first time I frequented your website page and thus far? I amazed with the research you made to make this actual post amazing. Excellent activity!
Pritchard
24-Jun-2021
Excellent, what a web site it is! This weblog gives valuable facts to us, keep it up.
McCrae
03-Jul-2021
If you wish for to improve your knowledge only keep visiting this site and be updated with the newest gossip posted here.
Ranford
01-Jul-2021
I do not even know how I ended up here, but I thought this post was good. I don't know who you are but definitely you're going to a famous blogger if you are not already ;) Cheers!
Colon
14-Aug-2021
Hello, I enjoy reading through your article. I like to write a little comment to support you.
Newman
18-Aug-2021
Hi there, I found your site by way of Google even as looking for a similar subject, your site came up, it seems great. I have bookmarked it in my google bookmarks. Hi there, just became aware of your blog via Google, and found that it's really informative. I am gonna watch out for brussels. I'll be grateful in case you continue this in future. A lot of people can be benefited from your writing. Cheers!
Kavanaugh
31-Aug-2021
Every weekend i used to pay a quick visit this website, because i wish for enjoyment, since this this web site conations actually fastidious funny information too.
Maloney
18-Mar-2021
I am not sure where you are getting your info, but good topic. I needs to spend some time learning much more or understanding more. Thanks for magnificent information I was looking for this info for my mission.
Chuter
14-Jun-2021
Amazing things here. I am very glad to see your article. Thanks so much and I am looking forward to touch you. Will you kindly drop me a e-mail?
Scott
02-Jun-2021
I think this is among the most significant info for me. And i'm glad reading your article. But want to remark on few general things, The site style is perfect, the articles is really excellent : D. Good job, cheers
Porteous
13-Aug-2021
I quite like reading a post that will make people think. Also, thank you for permitting me to comment!

                           
                           

                           

                           

Facebook User: