Monday, 24 August 2020

Basic Walkthrough Oracle Part-1

 

Basic Walkthrough Oracle Part-1

What is Oracle

Oracle is a relational database management system (RDBMS) developed by Oracle Corporation. This product is built for the basic function of storing retrieving data as required by other applications. It can be run either on the same computer or on another across a network. The server works in client-server architecture; hence it supports two types of components − (a) Workstation and (b) Server.

·        Workstation components are installed in every device/SQL Server operator’s machine. These are just interfaces to interact with Server components. Example: SQL Plus, SQL Developer and SQLCLI etc.

·        Server components are installed in centralized server. These are services. Example: Oracle Database, Real Application Clusters (RAC), etc.

Installing Oracle Express (XE)

            Almost all flavors of Oracle are very easy to install. And the best part is that it configures all interface drivers as a part of installation. Once you finish installation you are ready to fly your imaginations. MSSQL takes care of everything other than logic. And it takes care of logic too at some points, where it comes to integrity and security of your data.

                For our walkthrough we will be using Oracle XE and SQL Plus on windows XP 32bit OS. Because we have snapshots, you would hardly need any comments or notes for help. First of all, you need a copy of Oracle 11.2 XE which is free and you can download it from Oracle’s Software Cloud.

                So simple as anything else, insert the CD and wait for following screen. Or if it does not show up in few seconds, go head and start setup.exe from your CD. Same thing applies if you are using download extracted in any folder.  

Check files on your source. You need to have setup.exe file available for full install.


 

1.       Click setup.exe


 

2.       You will see welcome to InstallShield screen.


 

3.       License Agreement Screen.


 

4.       Accept the license agreement and click Next. You will see destination Location Screen.

 

 

5.       Specify Database Passwords – Enter database password here and click Next.


 

6.       Summary - screen displays some defaults. Click next.

 


 

7. Setup Status – Setup starts now, it will take a while to setup.

 


 

7.       Setup continues.

 


 

9. Installation completes. Click Finish.


 

10. Oracle places Get Started link on the desktop – the link to OEM. Try click and see how it looks like.

 


11. Oracle database web interface - OEM.


 

12. All Start Menu shortcuts are created. Being express version these are not too many.

 


 

13. You need to start the database by clicking “Start Database” link. A classical command window appears.

 



 

14. Run SQL Command Line.

 


 

 

 

15. You can use classical command line to start SQL Plus.

 



 

16. You can check database name, Oracle has one database per instance and it is created at the time of installation, usually.

 


 

17. Now, proud to have sql plus available, let us create a table and insert some rows of data (as below).

 

C:\Documents and Settings\sgill>sqlplus sys as sysdba

 

SQL*Plus: Release 11.2.0.2.0 Production on Wed Dec 5 18:00:18 2018

 

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

 

Enter password:

 

Connected to:

Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production

 

SQL> select name from v$database;

 

NAME

---------

XE

 

SQL> CREATE TABLE PERSON (ID SMALLINT NOT NULL, FNAME VARCHAR(20) NOT NULL , LNAME VARCHAR(20));

 

Table created.

 

SQL> INSERT INTO PERSON VALUES (1,'SARBJIT','GILL')

  2  ;

 

1 row created.

 

SQL> SELECT * FROM PERSON;

 

        ID FNAME                LNAME

---------- -------------------- --------------------

         1 SARBJIT              GILL

 

SQL> INSERT INTO PERSON VALUES (2,'SUKHJIT','GILL');

 

1 row created.

 

SQL> SELECT * FROM PERSON;

 

        ID FNAME                LNAME

---------- -------------------- --------------------

         1 SARBJIT              GILL

         2 SUKHJIT              GILL

 

SQL> INSERT INTO PERSON VALUES (2,'SUKHJIT','GILL');

 

1 row created.

 

SQL> SELECT * FROM PERSON;

 

        ID FNAME                LNAME

---------- -------------------- --------------------

         1 SARBJIT              GILL

         2 SUKHJIT              GILL

         2 SUKHJIT              GILL

 

SQL> delete from person where id=2;

 

2 rows deleted.

 

SQL> SELECT * FROM PERSON;

 

        ID FNAME                LNAME

---------- -------------------- --------------------

         1 SARBJIT              GILL

 

SQL> INSERT INTO PERSON VALUES (2,'SUKHJIT','GILL');

 

1 row created.

 

SQL>

 

 

Oracle differs significantly from many other RDBMS’s. It was first developed/released database that had so many open features that it became very popular in matter of months. With express version, there are not enough GUI tools included, mostly people use third-party tools like TOAD. DBMS, should it be any, usually is a server and it does not need to have a built- in client, if so, it only reduces the performance and hardly adds any benefit to the performance.

                Full version has many other tools (GUI and Command-line) that are meant of database administration as a whole. This concludes first chapter – installation or Oracle 11.2 XE.



No comments:

Post a Comment