What do bookcases do for enchanting?

When you plant bookcases near an enchanting table, it increases its power because of magics. What does this actually mean when I go to enchant items? If I have more bookcases will my enchantments, other things equal, be better, or does it just raise the limit on possible enchantments?

And more nitpicky, what about the "between" cases: There are overlapping ranges where you can get (for example) Sharpness II and III (lets pretend 15-18). If the presented enchantments were between 15 and 18 levels, would it be impossible to get III without X bookcases?


Solution 1:

Bookshelves increase the level of enchantments you can put on your items. For instance, without any bookshelves, you can only use enchantments from around levels 1-5. However, if you add more bookcases, you can use higher level enchantments. A table with 6 bookshelves will allow level 14 recipes. A table with 30 shelves will let you use level 50 recipes.

Enchantments have levels, and these levels are drawn from your current XP level. For instance, purchasing a level 5 enchantment will bring you down 5 levels. However if you do not have five levels, then you cannot buy the enchantment.

Link to table of enchantments and their levels