HomeGallery is SQL Server 2012 database. I will post all tables and stored procedures for learning purpose.