Tuesday, June 28, 2011

What is Oracle SQL Developer?


What is Oracle SQL Developer?
Oracle SQL Developer is a free graphical tool for database development. Using SQL Developer, you can browse database objects, run SQL statements and SQL scripts, and edit and debug PL/SQL statements. You can also run any number of provided reports, as well as create and save your own. SQL Developer enhances productivity and simplifies your database development tasks.
SQL Developer can connect to any Oracle Database version 9.2.0.1 and later and runs on Windows, Linux, and Mac OSX.
Take a quick look at some of the main features of SQL Developer.
Launch Demonstration

Architecture

Oracle SQL Developer was developed in Java leveraging the Oracle JDeveloper IDE framework. Default connectivity to the database is through the JDBC Thin driver (no Oracle Home required); the JDBC Type 2 driver (OCI client side driver) is also supported. There is a separate release available bundled with JRE 1.5, with an additional tools.jar to support Windows clients. Non-Windows clients only need JDK 1.5. or later. Installation is performed simply by unzipping the downloaded file.


Installation of Oracle SQL Developer is extremely easy and can be done in less than 2 minutes.
Sheila would like to install Oracle SQL Developer on both herLinux desktop at work and her Windows laptop at home.
Watch Sheila install Oracle SQL Developer on Linux.
Launch Demonstration
Watch Sheila install Oracle SQL Developer on Windows.
Launch Demonstration
















In this module, you learn how to connect to a database and access the database objects within.


Before you can access any database objects, you need to create a database connection. Each database connection is specific for a particular user on a particular database.
Help Sheila create a new database connection for the HR user.
Launch Demonstration




An Oracle Database stores and organizes information. Oracle SQL Developer is a tool for accessing and maintaining the data in the database. Tables are the basic storage structure for holding business data. In this module, you learn how to use data definitions (DDL) to create tables and work with them.
You may want to modify data entered in tables. You may also want to maintain the relationships between the data. Sometimes, you may want to remove tables that are no longer useful.
Now that Sheila has the Oracle SQL Developer software installed and working, and has familiarized herself with the tables in the HR schema, her next task is to build some tables. In the demonstrations, you help Sheila create and modify tables, manage constraints, and remove tables.



Creating Tables


You create tables with the SQL CREATE TABLEstatement. With Oracle SQL Developer, you have two options for creating tables.
  • Use the graphical interface that generates the SQL statement
  • Enter the CREATE TABLE statement in the SQL Worksheet
When creating tables, you must provide:
  • Table name
  • Column name(s)
  • Data type for each column
  • Optionality of the column
Guidelines for creating tables:You can also set up constraints on your columns to control the data in them.



Creating Tables Using the Table Dialog

Sheila needs to create the DEPENDENTStable, which should contain the following columns: IdFirstNameLastName,BirthDateRelationGenderBenefits, and RelativeId.
In the DEPENDENTS table, no two rows have the same ID. The Gender column can only be set to M or F. Also, the Benefits column stores large blocks of character data.
Help Sheila create the DEPENDENTS table using the Table Dialog.
Launch Demonstration


Tuesday, February 15, 2011

WELCOME TO "ORACLE"


  1. dual is a table that contains a single row.
  2. The dual table has one VARCHAR2 column named dummy.
  3. dual contains a single row with the value X.
The structure of the dual table:
SQL>
SQL> DESCRIBE dual;
 Name         Null?    Type
 DUMMY                 VARCHAR2(1)
SQL> SELECT FROM dual;

D
-
X

SQL>
SQL>
SQL> select 123 456 from dual;

   123*456
----------
     56088

SQL>
SQL> select sysdate from dual;

SYSDATE
----------
26-10-2009

SQL>