Using Constraints to Protect Calendar Data in PostgreSQL
Think about the lines of code you would have to write in order to manage a scheduling system. Duration checks, start and end time requirements as well as checking for overlap! You could spend a few days writing all that code or you could let PostgreSQL do it better with 5 lines of SQL.