bookings

0 rows


Columns

Column Type Size Nulls Auto Default Children Parents Comments
booking_id INT 10 null

primary key

patron_id INT 10 0
borrowers.borrowernumber bookings_ibfk_1 C

foreign key from the borrowers table defining which patron this booking is for

biblio_id INT 10 0
biblio.biblionumber bookings_ibfk_2 C

foreign key from the biblio table defining which bib record this booking is on

item_id INT 10 null
items.itemnumber bookings_ibfk_3 C

foreign key from the items table defining the specific item the patron has placed a booking for

pickup_library_id VARCHAR 10 null
branches.branchcode bookings_ibfk_4 C

Identifier for booking pickup library

start_date DATETIME 19 null

the start date of the booking

end_date DATETIME 19 null

the end date of the booking

creation_date TIMESTAMP 19 current_timestamp()

the timestamp for when a booking was created

modification_date TIMESTAMP 19 current_timestamp()

the timestamp for when a booking has been updated

status enum('new', 'cancelled', 'completed') 9 new

current status of the booking

cancellation_reason VARCHAR 80 null

optional authorised value BOOKING_CANCELLATION

Indexes

Constraint Name Type Sort Column(s)
PRIMARY Primary key Asc booking_id
biblio_id Performance Asc biblio_id
bookings_ibfk_4 Performance Asc pickup_library_id
item_id Performance Asc item_id
patron_id Performance Asc patron_id

Relationships