sql mapping to database tables.