This is a relational database built to handle the real-world logistics of a circulating inventory. It tracks users, physical books, and the active loans between them. The core focus here is data integrity: the schema uses strict constraints to make sure the system can never loan out a book that isn’t available, and uses Common Table Expressions (CTEs) to handle the transactional logic of checking books in and out while keeping the total inventory math perfectly accurate.