Sample code for databse application