Day-7 : Objects,Schemas,Profiles & Grants

What is schema?
A schema is collection of database objects of a user.

Which default Database roles are created when you create a Database?

CONNECT, RESOURCE and DBA Roles

What are Schema Objects?
Schema objects are the logical structures that directly refer to the database's data. Schema objects include tables, views, sequences, synonyms, indexes, clusters, database triggers, procedures, functions packages and database links.

Can objects of the same schema reside in different tablespaces?
Yes.

Can a tablespace hold objects from different schemes?
Yes.

What is Oracle table?
A table is the basic unit of data storage in an Oracle database. The tables of a database hold all of the user accessible data. Table data is stored in rows and columns.

What is an Oracle view?
A view is a virtual table. Every view has a query attached to it. (The query is a SELECT statement that identifies the columns and rows of the table(s) the view uses.)

Do a view contain data?
Views do not contain or store data.

Can a view based on another view?
Yes.

What are the advantages of views?
- Provide an additional level of table security, by restricting access to a predetermined set of rows and columns of a table.
- Hide data complexity.
- Simplify commands for the user.
- Present the data in a different perspective from that of the base table.
- Store complex queries.

What is an Oracle sequence?
A sequence generates a serial list of unique numbers for numerical columns of a database's tables.

What is a synonym?
A synonym is an alias for a table, view, sequence or program unit.

What are the types of synonyms?
There are two types of synonyms private and public.

What is a private synonym?
Only its owner can access a private synonym.

What is a public synonym?
Any database user can access a public synonym.
  
What are synonyms used for?
·         Mask the real name and owner of an object.
·         Provide public access to an object
·         Provide location transparency for tables, views or program units of a remote database.
·         Simplify the SQL statements for database users.

What is an index?
An index is a schema object that contains an entry for each value that appears in the indexed column(s) of the table or cluster and provides direct, fast access to rows.

How does the index updates?
Indexes are automatically maintained and used by Oracle. Changes to table data are automatically incorporated into all relevant indexes.

What are clusters?
A cluster is a schema object that contains data from one or more tables, all of which have one or more columns in common

What is cluster key?
The related columns of the tables in a cluster are called the cluster key.

What is index cluster?
A cluster with an index on the cluster key.

What is hash cluster?
A row is stored in a hash cluster based on the result of applying a hash function to the row's cluster key value. All rows with the same hash key value are stores together on disk.

When can hash cluster used?
Hash clusters are better choice when a table is often queried with equality queries. For such queries the specified cluster key value is hashed. The resulting hash key value points directly to the area on disk that stores the specified rows.

What is database link?
A database link is a named object that describes a "path" from one database to another.

What are the types of database links?
Private database link, public database link & network database link.

What is private database link?
Private database link is created on behalf of a specific user. A private database link can be used only when the owner of the link specifies a global object name in a SQL statement or in the definition of the owner's views or procedures.

What is public database link?
Public database link is created for the special user group PUBLIC. A public database link can be used when any user in the associated database specifies a global object name in a SQL statement or object definition.

What is network database link?
Network database link is created and managed by a network domain service. A network database link can be used when any user of any database in the network specifies a global object name in a SQL statement or object definition.

When creating a user, what permissions must you grant to allow them to connect to the database?
SQL> Grant CONNECT to user.

You want users to change their passwords every 2 months. How do you enforce this?

set password life time to 120 in profile.



No comments:

ORA-600 [kwqitnmphe:ltbagi], [1], [0] reported in the alert log file.

ORA-00600 [kwqitnmphe:ltbagi] Cause: This issue arises in 12.1.0.2. The error occurs because there are still Historical Messages without...