There are three ways to do this.
Moscow’s Foreign Language Library. Gates, a stern security guard, librarians that don’t understand one another, no single database, RFID tags for security purposes, a ban on bringing backpacks in (!). The wide variety of books is the only thing that saves this library from obliteration.
Pigna’s library. The honesty system at its finest. Just a heartwarming librarian and no security features. They make an assumption that everyone entering isn’t there for a random reason (which is close to truth).
The Russian State Library for Youth. A total absence of any visible gates or security features. Anyone strolling by can enter and read a book. As for bringing a book home, all one has to do to register is to show an ID. Every book has an RFID tag used for theft prevention, as well as for scanning books. I was surprised at how efficient the system was when I first took some books home: I stacked the books, put them on a table along with my library card, and I could go out. No librarian or gate needed.
There’s only one way to do it right.