Joe Celko's SQL for Smarties: Advanced SQL Programming, Third Edition

In the old days when we lived in caves and used mainframe computers with batch file systems, transaction processing was easy. You batched up the transactions to be made against the master file into a transaction file. The transaction file was sorted, edited, and ready to go when you ran it against the master file from a tape drive. The output of this process became the new master file, and the old master file and the transaction files were logged to magnetic tape in a huge closet in the basement of the company.
When disk drives, multiuser systems, and databases came along, things got complex and SQL made them more so. Mercifully, the user does not have to see the details. Well, this chapter is the first layer of the details.
The concept of a user session involves the user first connecting to the database. This is like dialing a phone number, but with a password, to get to the database. The Standard SQL syntax for this statement is:
CONNECT TO
::= [AS ] [USER ] DEFAULT
However, you will find many differences in various vendors' SQL products and perhaps in operating system level login procedures that have to be followed.
Once the connection is established, the user has access to all the parts of the database to which he has been granted privileges. During this...