checkout connected to database