Team Fly 

Page 23

CRITICAL SKILL 1.7
Work with Object and System Privileges

It's next to impossible to work with data in the Oracle Database 10g without looking at object privileges. In this section, we are going to look at these privileges as well as a suite of system privileges closely related to managing the Oracle Database 10g. The four main object privileges are select, insert, update, and delete, discussed in the next four sections. Oracle Database 10g uses the term grant when referring to giving out both object and system privileges.

Select

This is the primary and most commonly used privilege, permitting other users to view your data. There are three parts to grant statements:

1. The keywords grant select on.

2. The name of the object upon which the privileges are being given out.

3. The recipient of the grant.

Once the select privilege has been given out, the recipients, using a private or public synonym as described earlier in the ''Synonyms" section of this chapter, can reference your objects in their SQL statements.

Insert

This privilege allows users to create rows in tables belonging to other users. The creator of new rows in other users' objects is bound by the same rules used if they owned the objects themselves. They must adhere to the boundaries defined by the data types of the columns in the rows they create. For example, when rows are inserted into a table that has a column defined as type DATE, they must ensure that valid date type data is placed in the column so defined. As rows are created in an Oracle Database 10g table, the transaction must be committed to the database before the row becomes part of the information available to other users. With Oracle Database 10g, we use the term commit synonymously with save with other types of software.

Progress Check Answers

1. Installation, upgrades, tuning, and environment setup are four of many tasks performed by the DBA.

2. A private synonym can only be referenced in an SQL statement by the account who created and owns the synonym. A public synonym, created by a centralized user such as a DBA, is available to all users.

3. The default tablespace is the one within which users occupy space by default, unless another tablespace is mentioned as a table is created.

4. Quota on tablespaces is usually given out using bytes or megabytes as units of measurement.

5. The DBA goes to MetaLink to request assistance from Oracle's support organization.

6. Triggers cannot exist on their own without association with an Oracle Database 10g table.

Team Fly 
0042-CRITICAL SKILL 1.7 Work with Object and System Privileges