What is a database?

This question recently arose: "What's an Oracle database?"
It's a common question for someone new to Oracle to have.
I was going to answer in the thread, but I decided to put this thread here, where others can point to it in the future. It's a common question for someone new to Oracle to have. They hear all these words like redo log, tablespace, data file, control file, instance. How does it all fit together??
Well, here's my attempt at covering the basics. I tried to put these in the most logical order I could come up with. Corrections are welcome. I'll edit this as necessary.
The following are common Oracle terminology:
Datafile: An O/S file or raw device, which is used by Oracle to store data. Datafiles are the physical building blocks of a tablespace, which is a logical entity.
Control files: This can be thought of as having all the bootstrap information. It has pointers to datafiles, redo logs, as well as lots of housekeeping information that's beyond the scope of this document.
Redo logs: Redo logs contain a log of all transactions on the database. Whenever a change is made to the database, it's recorded in the redo log.
Database: The collection of data files, control files and redo logs. Taken together, they make up what Oracle refers to as a database. This is where all the data is stored.
Instance: Collection of processes and memory. An instance provides the means to mount, open, and interact with a database. This what you see running on your system, consuming resources and servicing calls from various database clients.
User: An account defined in the database that allows for a means to connect to an instance with a specific set of rights and privileges.
Schema: Collection of objects, all owned by one user. These can include: tables, indexes, synonyms, procedures, functions, packages, types, etc. Usually, all the database "stuff" related to a particular application will be owned by an application owner schema. When a User creates his very first object, this implicitly defines the user's schema.
Segment: An object, such as a table or index, to which space is allocated. Objects such as procedures, synonyms, functions, etc, only consume space in the data dictionary where they are defined, and are not segments.
Tablespace: A logical pool of storage available for use. When a user creates a segment in his schema, he must specify a tablespace from which space will be allocated. A tablespace is made up of one or more physical datafiles (actual files in the O/S).
Extent: A physical chunk of contiguous space, from a datafile. The size of an extent will always be a multiple of the block size. Extent sizes can be fixed (uniform size) or can be chosen by Oracle (autoallocate). When a segment fills the all the space that's currently allocated to it, it will attempt to allocate more space from the tablespace. The size of the allocation will be an extent.
Data block: The smallest addressable chunk of disk space in the database. The block size is chosen at database creation time, and is fixed. (More recent versions of Oracle provide for tablespaces with varying block sizes, but the default block size is chosen at database creation time, and cannot be changed.) The minimum block size is 2k, and the max varies by platform, but is usually 16k or 32k. The most common block sizes are 8k and 16k.
Hope this helps,
-Mark
Message was edited by:
Mark J. Bobak

Information about schemas is stored in a repository called the datadictionary.
The datadictionary is a collection of tables, etc located in the SYS schema.
Every Create table statement etc under the hood modify tables in the SYS schema.
Table definitions are stored in tab$ and obj$, column definitions in col$, etc.
The end-user can query the datadictionary by using a set of views, like user_tables, user_tab_columns, user_objects etc.
Those views are listed in the DICT view, and are documented in the Oracle reference manual.
When you submit a SELECT statement, Oracle (recursively) issues selects on the tables I mentioned above to check whether your query is correct, and how it should be executed. This is referred to as 'parsing'.
The dictionary also contains information regarding the physical location of all tables in the database.
If you want an overview of your own schema, issue in sql*plus
select object_type, object_name
from user_objects
Apart from that, most what you are asking about is described in the Oracle Concepts Manual.
This is a compulsory read.
Sybrand Bakker
Senior Oracle DBA

Similar Messages

  • What are all database monitering tools available in oracle

    what are all database monitering tools available in oracle

    Monitoring Database Operations
    Monitoring and Tuning the Database
    Oracle Database Online Documentation 11g Release 2 (11.2)

  • What kind of database the SSMA uses to store metadata in the file named "source-metabase.mb" ?

    What kind of database the SSMA uses to store metadata in the file named "source-metabase.mb" ?
    I'm looking for the method to open the file and add 'cutom migration script' (some automatization).

    Hi Poman.Pokrovskij,
    When you generate SSMA Assessment Report, there are several files created and saved into Report folder under your SSMA project folder. It includes
    source-metabase.mb, project-container.mappings, preferences.prefs, and so on.
    . MD files are usually saved in plain text format including inline text symbols, defining how a text is formatted such as the indentations, its table formatting, fonts, and headers.
    SSMA provides a project setting that allow you to customize how to set customized database migration. For example, to customize data migration SQL statement, you can modify project setting by navigating to Tools and choosing Project Settings,
    then looking for the setting for
    Extended Data Migration Options and change the value to
    Show. You can select use custom select and modify the SQL statement.
    For more information about SSMA for Oracle, you can review the following articles.How To Perform Incremental Data Migration Using SSMA:
    http://blogs.msdn.com/b/ssma/archive/2010/10/04/how-to-perform-incremental-data-migration-using-ssma.aspx
    Using SSMA Project Setting to Customize Database Migration:
    http://blogs.msdn.com/b/ssma/archive/2011/03/16/using-ssma-project-setting-to-customize-database-migration.aspx?Redirected=true
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • What are the database resources when collecting stats using dbms_stats

    Hello,
    We have tables that contain stale stats and would want to collect stats using dbms_stats with estiamte of 30%. What are the database resources that would be consummed when dbms_stats is used on a table? Also, would the table be locked during dbms_stats? Thank you.

    1) I'm not sure what resources you're talking about. Obviously, gathering statistics requires I/O since you've got to read lots of data from the table. It requires CPU particularly if you are gathering histograms. It requires RAM to the extent that you'll be doing sorts in PGA and to the extent that you'll be putting blocks in the buffer cache (and thus causing other blocks to age out), etc. Depending on whether you immediately invalidate query plans, you may force other sessions to start doing a lot more hard parsing as well.
    2) You cannot do DDL on a table while you are gathering statistics, but you can do DML. You would generally not want to gather statistics while an application is active.
    Justin

  • What kind of database driver should use for database adapter  in BPEL?

    what kind of database driver (XA or non-XA) should use for database adapter in BPEL? I have only one database adapter and no JMS.
    Thanks
    Jo
    Edited by: 799095 on Sep 30, 2010 8:35 AM

    Hi
    It depends on wheter you need XA transaction or not.
    See http://www.theserverside.com/discussions/thread.tss?thread_id=21385 third reply.
    If you only have one database and no synchronous dependency to the caller, non-XA should be OK.
    -Johan

  • So what is the Database setting in Preference for?

    In the years of using Safari, in the Preferences it has settings for Database under Security tab. I've left it at the default 5mb. Whenever I clicked Show Database nothing was ever in there. But yesterday there were two items. I Removed them not paying any attention really. Then today another appeared named ourstage.com.
    I've never been to that site or heard of it. So I went to it. Nope nothing I've ever been to.
    So what is this database setting? Should I leave it active? What benefit does it do for Safari or me as a surfer?
    Thanks
    Using the latest Safari released, Version 5.0.3 (6533.19.4) and 10.5.6

    HI,
    http://www.apple.com/safari/features.html
    See: HTML5 Offline Support
    I have "twitter.com" on mine. That way I never have to re sign in. A "super cookie" ... Not all sites support that feature.
    Carolyn

  • Can someone explain what is the Database Instant Client

    Download 10.2.0.4 Database Instant Client for Apple Mac OS X on Intel x86
    What does the Database Instant Client contain?
    What functionality does it have?
    Does it include a 'lite' version of the database to run locally? Or is it only a set of tools that can connect to a remote (on another machine) database?

    It is only a client for connecting to databases. It is easier to install than the full client.
    It does not include a database. Check the following link :-
    http://www.oracle.com/technology/tech/oci/instantclient/index.html
    http://www.ContractOracle.com

  • What  type of  database  operations  effectd  with  Unicode  and  non  unic

    Hi  Friends,
       I want  to  know what  type of  database  operations  effects  with  Unicode  and  non Unicode  Programing  .
    Thanks,
    Ravi Kumar Mukkera

    Hi ,
    Check these links .
    http://help.sap.com/saphelp_nw04/helpdata/en/62/3f2cadb35311d5993800508b6b8b11/frameset.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtoot/docs/library/uuid/ff99cb90-0201-0010-e389

  • What version of Database is required to using JHeadstart?

    What version of Database is required to using JHeadstart?

    Question
    ========
    1) Do you have to upgrade Forms 4.5 character mode to Forms 6i and then Forms 9i before migrating to Java, or can the migration be done directly from either Forms 4.5 or 6i ?
    Jheadstart (JDG) only uses the designer repository as input and not forms. So if you have forms generated out of the designer repository, you can use the designer forms modules as jheadstart input. If you don't, you have to reverse engineer (capture) your forms into designer first.
    2) What version of Designer is also required ?
    You need designer 6i patch 4.2, see also http://otn.oracle.com/consulting/9iServices/install.html#compatibility
    Gerrit

  • What is Oracle Database Clusturing?

    Hi Gurus
    What is Oracle Database Clusturing?
    And what is the procedure?
    Help will be highly appreciated.
    Regards
    Zahid Ali

    This will answer your first question:
    http://otn.oracle.com/pls/db92/db92.to_toc?pathname=rac.920%2Fa96597%2Ftoc.htm&remark=docindex
    This will answer your second question:
    http://otn.oracle.com/pls/db10g/db10g.to_toc?pathname=..%2F..%2Fhtml%2FB10766_08%2Ftoc.htm&remark=portal+%28Books%29
    This is for 10g.
    more at http://tahiti.oracle.com

  • What is Minimum database requirement for EBS R12

    What is Minimum database requirement for EBS R12? for example if it works only with enterprise edition or with standard edition also.
    Regards,
    Sandeep V

    Question is very interesting and very important. The link does not answer if "standard edition" can be used. Obviously, Rapid Install installs EE database. But we can move the database to another dedicated database server.
    And the question becomes "Can we move it to a Standard Edition database server"? Huge ramifications on costs. Extremely important. Nowhere I could find positive answer. I wonder if anyone had found an answer?AFAIK, it is not supported.
    My own research shows that VIS database (built at home) has partitioned tables in APPLSYS and APPS schemas. Partitioning is not supported in Standard Edition.Correct.
    I wonder if we can migrate the database and manually move several partitioned tables into non-partitioned Standard Edition. Will EBS R12 break? Will Oracle Support cancel its support?Oracle will not support this -- Please log a SR to confirm this with Oracle Support.
    Thanks,
    Hussein

  • Ever wonder "what if this database contains my data ?"

    When you see a forums posting about missing datafiles , errors in recovery, SQLs returning the wrong results because they haven't been correctly written and tested .... etc etc ... do you ever wonder "what if this database contains my data ?".
    -- as when it seems that the database might be some government database or one at a bank or a financial institution or a utility company ...
    Edited by: Hemant K Chitale on Apr 24, 2009 2:18 PM

    Hi Hemant
    Yes ... Everytime when I see such messages, I wonder "What if it is my database's problem?". And after taking it in the consideration, I begin to help and support the unlucky OP witih all my (little) knowledge :)
    And everytime seeing such messages, I'm getting sure to have backups of my databases and each time to test new recovery scenario to make me feel more confortable and let me sleep at night more calmly :)
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com

  • Is there anyway to tell what is the database column behind the form field (

    Is there anyway to tell what is the database column behind the form field (in Oracle financials).

    If you are lucky, it can be simple, but if you are unlucky, it can be very complicated.
    Using Help > Diagnostics > Examine when in the field will give you the name of the field.
    Help > Diagnostics > Examine (Block: SYSTEM / Field: LAST_QUERY) will give you the query for the last block queried, which may or may not be the block you want, depending on how the form is defined (ie Master Detail relationships). If this is for the correct block and the field name is one of the columns returned by the query, then that is probably your answer.
    If the Last Query is not for the correct block, using Help > Record History will give you the table or view that the block is based on (only where there is already a record in the block).
    If the field name matches a column name in the table or view, then that is probably where it comes from. If there is no matching column name in the table or view, then the field is probably not queried directly from the database as part of the main query - it is probably populated by logic in the form, like the POST-QUERY trigger on the block. This means you need to open the form in Forms Builder to find what is populating your field (Program > Find and Replace PL/SQL is very handy for this).

  • What is the Database schema?

    Hello Gurus,
    What is the Database Schema?
    How do we incorporate in Database and why?
    Thanks in advance.
    ~ SubbaReddy .M

    The schema is a database structure. It typically has a many to one relationship with the database. It is used to store and segregate database objects such as tables, views, synonyms, etc. Check your database concepts manual for a proper discourse on this subject.
    RP.

  • What is the Database Utility

    What is the Database Utility and its use ?
    Give an example if possible ..... PLease

    hi,
    Database Utility is used for adjusting the database on changing the fields and field attributes ..
    Check out the below related threads
    database utility
    database utility
    SE14 transaction
    Inserting new fields in a Dictionary Table?
    Regards,
    Santosh

  • What is  logical database

    hi,
    what is logical databse  and its application.
    please tell ...
    thanks

    I have explained below the steps of how a LDB works in a report program.
    Logical database is a program which fetches data from the database and provides it to the other programs.
    It has its own selection screen. When we use a LDB in a report program, that selection screen automatically appears for this report program.
    In order to use it in a report program:
    1. We have to mention the LDB name in the attributes of report program… say for eg: we mention PNP (is one of the LDB).
    2. We have to mention a node in the report program. Node is nothing but a work area.
             This is done by declaring the TABLES statement in the report program.
              For eg:      TABLES : PERNR
              PERNR is a structure which contains the basic details of an employee (related to HR module)
    3. We have to mention the internal tables within which the relevant data is fetched.
              This is done by declaring the INFOTYPES statement in the report program.
              For eg:   INFOTYPES: 0000, 0001,0002, 0006, 0007.
              Infotypes are nothing but a table structure. Here we are declaring the internal tables PA0000, PA0001, PA0002.....which will have the same structure of corresponding database tables PA0000, PA0001, PA0002.. in the database.
    Now, how the data is actually fetched in to the program:
    1.     The fetching of the data is trigerrred by a ‘GET node’ event.
    Say, if we mention - GET PERNR. statement in the program. The data rows satisfying the parameters selected in selection screen are fetched from database, but filled into the PERNR work area row by row.
    2.     For each row fetched into the PERNR - relevant data is fetched into the internal tables PA0000, PA0001, PA0002 from database tables. For eg: PA0002 is a database table which holds the personal details of an employee and there may be many rows of data for  the same employee. So based on the personnel number (employee number) fetched into PERNR all data records of that employee are fetched in to our internal table pa0002 from the database table PA0002.
                 Like wise , the other internal tables - pa0003, pa0006 are filled with the corresponding data.
                Like data in PERNR work area acts like a primary key to fetch the data from data base to the internal tables.           
    3.     For these data fetched into internal tables - we can write our data processing statements or just display on the list report.
                 So what ever statements we write between GET PERNR. and END SELECTION. are executed repeatedly like within a loop until all data records satisfying the parameters entered in selection screen are fetched into the node(work area) PERNR.
                 GET PERNR.   * like LOOP.
                           write pa0002-name.   * This statement is executed for each data record fetched into the work area PERNR.
    other data processing statements.
                 END-SELECTION        * like END LOOP.
    Reward if useful.
    Regards,
    Pavithra

Maybe you are looking for