Code Sample for Database