Latest Activity In Study Groups

Join Your Study Groups

VU Past Papers, MCQs and More

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.


GDB of CS403 will be launched on 15th of July 2013 (15-07-2013) and will last for 48 hours only.

GDB_CS403_1 Dated: Jul 09, 13

Dear Students!

Please Note that GDB of CS403 will be launched on 15th of July 2013 (15-07-2013) and will last for 48 hours only.

The topic will be as follows:



A company is developing a database system containing information about cities, towns, and villages in the country. The number of cities, towns, and villages are in thousands and the database program should allow users to search a particular place by name. Users should also be able to search all places that match a particular value or range of values for attributes such as location or population size. This particular feature is known as a range query.



A reasonable database system must answer queries quickly enough to satisfy a typical user. For an exact-match query, a few seconds is satisfactory. If the database is meant to support range queries that can return many cities that match the query specification, the entire operation may be allowed to take longer. To meet this requirement, it will be necessary to support operations that process range queries efficiently by processing all cities in the range as a batch, rather than as a series of operations on individual cities.



Different indexing methods can be used to perform this operation. What will be your choice if:



a) database is created once and has no change over a period of time

b) database is created once and database is changed over a period of time





Justify your answer with appropriate logic.




Note: Try to provide precise, to the point answer and avoid irrelevant details.

Views: 6124

Replies to This Discussion

case a) database change ni hogi over a period of time means k we need only search and retrieve the records which filters (suppose in city manner) ab city me bohat se records hoge jo k filter ho ker aayege to time lega cluster indexes do this work easily... ........
case b) Non clustering use because database changes over a period of time and re-indexing happens if we use clustering...

a)database is created once and has no change over a period of time......................(Clustered Indexes)

b)      database is created once and database is changed over a period of time...............................(.Non-clustered Indexes).

 what all of u think about 

Dynamic indexing: the file grows or shrinks to adapt to the volume of data good space utilization and good performance

a Clustered Index only reorganizes the data pages so that the rows are logically sorted in Clustered Index order. The pages are not guaranteed to be ordered physically. SQL Server doesn’t necessarily store the data physically on the disk in clustered-index order, but while creating an index, SQL Server attempts to physically order the data as close to the logical order as possible. Each page in an index’s leaf level has a pointer to the page that logically precedes the current page and to the page that logically follows the current page, thereby creating a doubly linked list. The sysindexes table contains the address of the first leaf-level page. Because the data is guaranteed to be logically in clustered-index order, SQL Server can just start at the first page and follow the index pointers from one page to the next to retrieve the data in order.

So its not guaranteed about the physical ordering of records/rows if a table has Clustered Index on it. It is a common misconsecption among people that Clustered Index sorts data physically & Non Clustered Index sorts data logically.

plz chk this

Please select one option and give justification logically.

I suspect the reasoning behind this advice is the idea that the clustered index stores the data in order of the clustering key (ack) and hence it’s ‘logical’ that such a structure would be best for range scans as SQL can simply start at the beginning of the range and read sequentially to the end.cluster 4 a 

nd non cluster 4 b option because chnging doesn;t effect this mettr

.

NON-Clustered Is my answer 

which is wrong

teacher have asked a tricky question

choice of different Different indexing methods

if 

a) database is created once and has no change over a period of time

b)  database is created once and database is changed over a period of time

RSS

© 2021   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service