I haven't bought a book in a store since probably 1999. I remember buying from bookpool.com when they were around and had the cheapest tech books.
Recently Amazon has basically dominated this market and has eaten the B&M stores lunches, as far as I am concerned. The best thing Amazon ever did was launch the ratings and reviews and get tons of people to add valuable content to their site and augment the one huge disadvantage they had over B&M; you can't tell if the book was any good. I find the ratings and reviews are as valuable, if not more, than me briefly looking through the book myself.
Now, I don't think ebooks have much to do with this at all as I don't see ebooks selling nearly as well as people think they will sell. I personally hate reading in that format and will continue to buy books to read as I find the experience much more enjoyable and maintainable. Thinks like Safari online are just AWFUL ways to consume material, IMO. The only reason I have ebooks is if I travel and want to have something to read on my iPad instead of carrying 4-6 books with me.
Oh yeah, and don't get me started on the price of most technical ebooks!
All in all...B&M stores like Borders are dying b/c they couldn't or wouldn't adapt in the face of someone like Amazon who is better at the modern game than they are. This is very much like Netflix v Blockbuster...