Beginning SQL
Beginning SQL Beginning SQL
Chapter 12 Creating User IDs Figure 12-2 The system administrator (SA) sets up users and defines the privileges those users have. In many cases, this is done through a program interface to the DBMS, where the SA simply opens a form and starts creating users, typing their initial password and telling the DBMS whether the user can change their password, whether they must change their password the first time they log on, and so forth. In fact, some DBMSs can allow all of the user/password validation to be performed by the OS, which means no user IDs or passwords are required inside of the database itself. Some DBMSs have SQL statements, extensions to the SQL standard specific to that DBMS, to allow creating users. For example, in Oracle the statement looks like this: CREATE USER username IDENTIFIED {BY password | EXTERNALLY | GLOBALLY AS external_name} Options After creating users and determining privileges for those users, the SA can then alter users and privileges. Alter User 330 Personal Depot Group ID Mary Sue John User ID : usr Personnel Personnel Manager Betty User ID : usr Betty Personnel Dept Head Cyndi User ID : usr Cyndi The SA can always modify the user by changing the password and, in some systems, by making a user inactive or setting times of day or days of the week that the user can log in to the database. Some DBMSs provide SQL statements for these functions. For example, in Oracle, the statement may look like the following:
- Page 650: 3. Build a record in the Rentals ta
- Page 654: The other statement that the ANSI S
- Page 658: SAVE TRANSACTION Select Update Begi
- Page 662: Figure 11-5 Begin Transaction Delet
- Page 666: In spite of all of these performanc
- Page 670: Shared A shared lock essentially me
- Page 674: of record locks, the DBMS may decid
- Page 678: No updates, additions, or deletions
- Page 682: International Board Manufacturer ha
- Page 686: contention. You could wrap your new
- Page 690: Summary Transactions ensure that us
- Page 696: Chapter 12 328 SQL security is cent
- Page 702: ALTER USER username options ALTER U
- Page 706: In Figure 12-3, three different gro
- Page 710: How It Works After you run this sta
- Page 714: check constraints can be used in a
- Page 718: You could then give SELECT privileg
- Page 722: Limitations on Views Views are by t
- Page 726: GRANT SELECT (NAME, SSN, SALARY) ON
- Page 730: Betsey also grants privileges to Ji
- Page 734: The CASCADE option tells the DBMS t
- Page 738: 13 Database Tuning SQL is a languag
- Page 742: Perhaps this doesn’t sound remote
- Page 746: When an application asks for data f
Chapter 12<br />
Creating User IDs<br />
Figure 12-2<br />
The system administrator (SA) sets up users and defines the privileges those users have. In many cases,<br />
this is done through a program interface to the DBMS, where the SA simply opens a form and starts creating<br />
users, typing their initial password and telling the DBMS whether the user can change their password,<br />
whether they must change their password the first time they log on, and so forth. In fact, some<br />
DBMSs can allow all of the user/password validation to be performed by the OS, which means no user<br />
IDs or passwords are required inside of the database itself.<br />
Some DBMSs have <strong>SQL</strong> statements, extensions to the <strong>SQL</strong> standard specific to that DBMS, to allow creating<br />
users. For example, in Oracle the statement looks like this:<br />
CREATE USER username<br />
IDENTIFIED {BY password | EXTERNALLY | GLOBALLY AS external_name}<br />
Options<br />
After creating users and determining privileges for those users, the SA can then alter users and privileges.<br />
Alter User<br />
330<br />
Personal Depot<br />
Group ID<br />
Mary Sue John<br />
User ID : usr Personnel<br />
Personnel<br />
Manager<br />
Betty<br />
User ID : usr Betty<br />
Personnel<br />
Dept Head<br />
Cyndi<br />
User ID : usr Cyndi<br />
The SA can always modify the user by changing the password and, in some systems, by making a user<br />
inactive or setting times of day or days of the week that the user can log in to the database. Some<br />
DBMSs provide <strong>SQL</strong> statements for these functions. For example, in Oracle, the statement may look<br />
like the following: