The following example shows inserting a student record into DB.
The selectKey tag allows us to generate a primary key.
Depending upon the database and primary key generation strategy
the selectKey tag has to be specified before or
after the insert query. Instead of manually ordering the queries we can use
select key type attribute to specify the order of
query execution. The possible values are pre and
post.