Thursday 19 April 2012

Choose a suitable table type - Challenge 1

Examination must be an integral part of learning process or other way round, learning is incomplete without an examination. But not such examinations, which just declare a learner pass or fail, but those which give an opportunity to learn. In my opinion, when we call some person as "experienced" means, the person has learned by facing and solving problems (examinations). Truly, experience is a great teacher, it gives the exercise first and leaves it up to you to draw a lesson from it, which as we all know from "experience" we never forget in life. What part of lessons you really remember from your schooling or college? A very small indeed. Because, the first thing is, we did not know its application in the real life when the lessons were given to us and secondly, the answer lies in this very first reason, that we did not learn the lessons through exposure to problems, but just lessons were in a way "taught" (say read out) to us.

Here the questions I am going to post are going to be  simple but practical questions faced in real life as developer. I am liberal to provide you links in the options of the questions itself to different pages / posts of this same blog and may be some other blogs too or you are free to search the answers elsewhere in books, docs, manuals or from your own experience. So you have an opportunity to thoroughly read or critically learn from the pages in search of the proper answer. I would of course like you to post your answers with reasons / explanations in the comments of the respective posts, and let there be a technical analysis in those reasons / explanations. So I hope you might be eager and ready as well to face this first challenge (many more to come, become a follower of this blog so that you will get automatic updates and of course such posers) -

Choose a suitable type of table to be created for following situation -
I want to store the data about employees and departments of a company. The data about the employees consists of (empid, name, job, salary, commission, departmentid) and about the departments consist of (departmentid, department name, location). The requirement is, while I need to access and/or manipulate the data of employees and departments individually a few times, but more frequently I list the names of the employees, their salaries along with the names of the departments and location of the departments in my application. Which of the following table / structures you would prefer to use and why? (this poser assumes the Oracle database, but the professionals from other DB implementations are invited to answer from their own area for readers to have a comparative study, which of course leads to cross platform knowledge and that is also the purpose behind the posts of this type). Your options / links are -

(a) Heap Organized Tables (b) Nested Tables (c) Object Tables (d) External Tables (e) Clustered Tables (f) Temporary Tables (g) Index Organized Tables

If you have liked it, then another more interesting quiz : Click Here 

PS : Share this post generously on your social or professional network.

1 comment:

  1. i will prefer the index organise table for the above scenario since access / modifiaction can be done easily through emp id as primary key

    ReplyDelete