code created to insert tuples in database