2 Day Developer > Managing Database Objects > Overview of Managing Objects > Managing Database Objects W...
Managing Database Objects With Object Browser |
Previous |
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:
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".
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.
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".
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
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
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
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?".
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
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
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
In the Object list, select other object types to display any existing objects of that type in the HR
schema.