Are heaps considered an index structure or are they strictly a table structure without index? Inspired by this post: https://twitter.com/#!/SQLChicken/status/102930436795285505


Heaps: Are they considered an index structure or are they strictly a table structure without index?
An index implies there is data order to the rows. Given that a heap isn't created with any such order and doesn't maintain an order either, it's just a method of storing table data.

There are a few examples (say, dm_db_index_physical_stats) where to specify a heap, you have to enter an index id of 0. While this seems to contradict what I just said, I think this is just a magic value to simplify the API and its usage; nothing more.