Managing Database Objects With Object Browser

Previous
Previous
Next
Next

You can use the Object Browser page to create, modify, or view all your database objects. For example, with Object Browser you can create a table and then modify it by adding and deleting columns or adding constraints. You can also view all the objects that are currently used in a schema, such as those associated with the HR user.

To access the Object Browse page:

  1. Log in to the Database Home Page. See "Logging in to the Database Home Page". To view the database objects or run the examples discussed in this guide, enter HR in the Username field and your password for the HR user account in the Password field. See "Sample HR Account".

  2. On the Database Home Page, click the Object Browser icon.

    The Object Browser page displays with two sections:

    • The Object Selection pane displays on the left side of the Object Browser page and lists database objects of a selected type within the current schema. For example, for the HR user the Tables object list includes countries, departments, employees, jobs, job_history, locations, and regions.

    • The Detail pane displays to the right of the page and displays detailed information about the selected object in the object list. You can click the tabs at the top of the Detail pane to view additional details about the current object.

  3. On the Object Browser page, you can create, alter, and view database objects. Click the HR EMPLOYEES table in the Tables object list to display information about the structure of that table.

    The information for the employees table includes the following about the columns and their datatypes:

    Column Name              Data Type        Nullable
    ------------------------ ---------------- ---------
    EMPLOYEE_ID              NUMBER(6,0)      No
    FIRST_NAME               VARCHAR2(20)     Yes
    LAST_NAME                VARCHAR2(25)     No
    EMAIL                    VARCHAR2(25)     No
    PHONE_NUMBER             VARCHAR2(20)     Yes
    HIRE_DATE                DATE             No
    JOB_ID                   VARCHAR2(10)     No
    SALARY                   NUMBER(8,2)      Yes
    COMMISSION_PCT           NUMBER(2,2)      Yes
    MANAGER_ID               NUMBER(6,0)      Yes
    DEPARTMENT_ID            NUMBER(4,0)      Yes

    Note the employees table uses numeric (NUMBER), character (VARCHAR2), and date (DATE) datatypes. See "Using Datatypes".

  4. In the Tables object list for the HR user, click the DEPARTMENTS table to view information about the structure of that table.

    The information for the departments table includes the following:

    Column Name              Data Type        Nullable
    ------------------------ ---------------- ---------
    DEPARTMENT_ID            NUMBER(4,0)      No
    DEPARTMENT_NAME          VARCHAR2(30)     No
    MANAGER_ID               NUMBER(6,0)      Yes
    LOCATION_ID              NUMBER(4,0)      Yes
  5. In the Tables object list for the HR user, click the JOBS table to view information about the structure of that table.

    The information for the jobs table includes the following:

    Column Name              Data Type        Nullable
    ------------------------ ---------------- ---------
    JOB_ID                   VARCHAR2(10)     No
    JOB_TITLE                VARCHAR2(35)     No
    MIN_SALARY               NUMBER(6,0)      Yes
    MAX_SALARY               NUMBER(6,0)      Yes
  6. In the Tables object list for the HR user, click the JOB_HISTORY table to view information about the structure of that table.

    The information for the job_history table includes the following:

    Column Name              Data Type        Nullable
    ------------------------ ---------------- ---------
    EMPLOYEE_ID              NUMBER(6,0)      No
    START_DATE               DATE             No
    END_DATE                 DATE             No
    JOB_ID                   VARCHAR2(10)     No
    DEPARTMENT_ID            NUMBER(4,0)      Yes
  7. In the Tables object list for the HR user, click the LOCATIONS table to view information about the structure of that table.

    The information for the locations table includes the following:

    Column Name              Data Type        Nullable
    ------------------------ ---------------- ---------
    LOCATION_ID              NUMBER(4,0)      No
    STREET_ADDRESS           VARCHAR2(40)     Yes
    POSTAL_CODE              VARCHAR2(12)     Yes
    CITY                     VARCHAR2(30)     No
    STATE_PROVINCE           VARCHAR2(25)     Yes
    COUNTRY_ID               CHAR(2)          Yes

    Note the use of the CHAR datatype for a fixed-length character field. See "What Are the Character Datatypes?".

  8. In the Tables object list for the HR user, click the COUNTRIES table to view information about the structure of that table.

    The information for the countries table includes the following:

    Column Name              Data Type        Nullable
    ------------------------ ---------------- ---------
    COUNTRY_ID               CHAR(2)          No
    COUNTRY_NAME             VARCHAR2(40)     Yes
    REGION_ID                NUMBER           Yes
  9. In the Tables object list for the HR user, click the REGIONS table to view information about the structure of that table.

    The information for the regions table includes the following:

    Column Name              Data Type        Nullable
    ------------------------ ---------------- ---------
    REGION_ID                NUMBER           No
    REGION_NAME              VARCHAR2(25)     Yes
  10. In the object list, select Views, then click the emp_details_view view to display information about the structure of that view. That is contains columns from the employees, departments, jobs, locations, countries, and regions tables.

    The information for the emp_details_view view includes the following:

    Column Name              Data Type        Nullable
    ------------------------ ---------------- ---------
    EMPLOYEE_ID              NUMBER(6,0)      No
    JOB_ID                   VARCHAR2(10)     No
    MANAGER_ID               NUMBER(6,0)      Yes
    DEPARTMENT_ID            NUMBER(4,0)      Yes
    LOCATION_ID              NUMBER(4,0)      Yes
    COUNTRY_ID               CHAR(2)          Yes
    FIRST_NAME               VARCHAR2(20)     Yes
    LAST_NAME                VARCHAR2(25)     No
    SALARY                   NUMBER(8,2)      Yes
    COMMISSION_PCT           NUMBER(2,2)      Yes
    DEPARTMENT_NAME          VARCHAR2(30)     No
    JOB_TITLE                VARCHAR2(35)     No
    CITY                     VARCHAR2(30)     No
    STATE_PROVINCE           VARCHAR2(25)     Yes
    COUNTRY_NAME             VARCHAR2(40)     Yes
    REGION_NAME              VARCHAR2(25)     Yes
  11. In the Object list, select other object types to display any existing objects of that type in the HR schema.