ZS Associates interview question

database architecture and stored procedure