A chained library is a library where the books are attached to their bookcase by a chain, which is sufficiently long enough to allow the books to be taken from their shelves and read, but not removed from the library itself. The practice was usual for reference libraries (that is, the vast majority of libraries) from the Middle Ages to around the 18th century. This would prevent theft of the library's materials. Since the chaining process was also expensive, it was not used on all books, only the more valuable books such as reference works or large books in a collection were chained. Librarians in the Middle Ages often invoked curses as well to keep books from being stolen. Once such curse written into the books was,