Implementing theater with SQL database