Ronggen,
How will you cope if a hotel has more than one room of the same type available on the same date?
I had a similar idea to you when I first looked at the DB interface, but I realised that even though the interface throws a DuplicateKeyException, the implementation doesn't have to.
If the data doesn't have to be unique, then it makes things easier (no checking code
.
Simon