Objects in database (Part 1)
Objects inside a relational database:
- User is the login used to access database. User itself cannot do anything, not even can access to database. It needs to be granted with neccessary privileges in order to access database and perform any operations, for example we need to grant create session privilege to users in order for them to access database and create table privilege for them to create table.
- Role is simply a collection of privileges that predefined in the database. For example, if we grant dba role (Database Administrator) to a user, the user can do anything within the rights defined in role dba. We can even create customized role like clerk and grant it to user, so that the user can (and only) access clerk related data.
- Schema can be defined as a group with the database objects inside, and in Oracle it is simply the user who created the database objects. For example when user james create a table invoice, this invoice table will be under james schema.
- Session is the connection when a user logs into the database.
- Table is place where actual data is kept, which formed by column and row. Column is the structure of the table, while row is the record of the table.
- Synonym is alias of table (and some other database objects).
- View is a short hand for SQL select statement, which can present the table in a different format. From user's point of view, view and table will not have different, except that user cannot modify data in a view.

0 comments:
Post a Comment