How do you test whether the database is updated as and when an information are added in the front end?Give me an example?

It depends on what level of testing you are doing.When you want to save something from front end obviously, it has to store somewhere in the database .
You will need to find out the relevant tables involved in saving the records.
Data Mapping from front end to the tables.Then enter the data from front end and save.
Go to database, fire queries to get the same date from the back end.