SlideShare une entreprise Scribd logo
1  sur  31
Introduction
    Describing the Life Cycle Development Phases
    Defining a Database
    Discussing the Theoretical, Conceptual, and Physical Aspects of a Relational Database
    Describing How a Relational Database Management System (RDBMS) Is Used to Manage
    a Relational Database
    Describing the Oracle Implementation of Both the RDBMS and the Object Relational
    Database Management System (ORDBMS)
    Describing How SQL Is Used in the Oracle Product Set

Writing a Basic SQL Statement
   Describing the SQL Select Capabilities
   Executing a Basic Select Statement with the Mandatory Clauses
   Differentiating Between SQL and iSQL*Plus Commands

Restricting and Sorting Data
   Limiting the Rows Retrieved by a Query
   Sorting the Rows Retrieved by a Query

          Database Basic & Advance Courses by Dip Mail me at
                                     dip.ray@plentynum.com                      1
Suggested Study Material :

Oracle Database 10g SQL
By: Jason Price
  › Publisher: McGraw-Hill/Osborne
  › ISBN: 9780070587557
  › Edition: 1 - Pub Date: 13-APR-04
  › www.tatamcgrawhill.com/html/9780070587557.html




    Database Basic & Advance Courses by Dip Mail me at
                               dip.ray@plentynum.com     2
DBMS is the collection of interrelated data and a set of program to access the data.
DBMS allows only one person to access the data at a given point time.

While the DBMS fulfilled the basic requirements of storing data,they were not a
practical solution to efficiently storing,manipulating,and retrieving data quickly and
easily.

So based on the theory of relational data modeling by Dr. Edgar Codd publishes in the
year 1970 , In 1977 Software Development Laboratories (SDL) formed by Larry Ellison,
Bob Miner, Ed Oates and Bruce Scott with $2,000 of startup cash. Larry and Bob were
working on a CIA project code-named "Oracle."

In 1978 SDL changes its name to Relational Software Inc. (RSI) with CIA as the first
customer.

In 1982 RSI changes its name to Oracle Systems Corporation (OSC) and then simplifies
the name to Oracle Corporation.

          Database Basic & Advance Courses by Dip Mail me at
                                     dip.ray@plentynum.com                     3
RDBMS manages large volumes of data while supporting a large number of users
simultaneously.

In a relational database,files do exist,but only as a medium to store data on disk.
While a file processing system will only access a particular file when necessary to
retrieve data,a relational database system will access all files simultaneously as
one seamless system. The data that is stored in the database is completely
independent of the files. The entire system is managed by a central database engine
that processes queries and manipulates data on demand. A single query can retrieve
the data regardless of where it is stored.

Instead of merely acting as a journal of transactions,a relational database preserves
the natural relationships that exist between real world entities and stores the data in
this manner.




          Database Basic & Advance Courses by Dip Mail me at
                                     dip.ray@plentynum.com                    4
For example,data for a company’s employees is stored in a structure,with each
employee stored only once. Data for the employees’ dependents may also need to be
stored in another structure Each record for a dependent will contain a pointer which
references its related employee.


Figure in the next slide shows how the relational database preserves the relationships
that occur naturally between employees and their dependents.




          Database Basic & Advance Courses by Dip Mail me at
                                     dip.ray@plentynum.com                    5
Dependen
                                                     t1

EMPLOYEE 1                                        Dependen
                                                     t2
                                                             Dependen
                                                                t1

                                                             Dependen
EMPLOYEE 2                                                      t2

                                                             Dependen
                                                                t3


EMPLOYEE 3


   Database Basic & Advance Courses by Dip Mail me at
                              dip.ray@plentynum.com                     6
As shown in the Figure, more dependents can be added to a single employee
without storing the employee’s information over and over again. Data can also be
stored for an employee that has no dependents whatsoever. If an employee
leaves
the company,deleting the employee would also automatically delete all data for
the employee’s dependents. Since data is stored only once,if an employee moves
to a new address,updating the data is only a matter of changing a single record.

This configuration reduces data redundancy,which saves critical storage space,
and still provides simplicity and ease in data management.

An additional benefit of the RDBMS is that it is self-describing. The database
contains not only users’ data,but also a description of its own structure, which is
commonly referred as metadata.




        Database Basic & Advance Courses by Dip Mail me at
                                   dip.ray@plentynum.com                     7
Entity-Relationship Model

Entities

An entity is the person,place,thing,or abstract concept that you want to track in
the database. When building the data model,the first thing to do is identify all
the required entities based on the initial system requirements that were
determined during the analysis phase. Each entity must be clearly defined to
avoid ambiguity and design flaws.

You should first build a simple list of the entities, and then add each one to the
data model. In the James Martin data model,entities are represented by squares
with rounded corners and are labeled with their names.




           Database Basic & Advance Courses by Dip Mail me at
                                      dip.ray@plentynum.com                 8
Below Figure shows a data model with a few example of entities for a
                   student registration system for a college.


STUDENT                        CLASS                         SUBJECT   INSTRUCTOR



Since each entity in a data model should only represent a single instance of the
entity,the name of each entity should be listed in its singular form. The design
should only show how one single entity relates to another single entity.

The entities can be placed anywhere in the data model and can be adjusted for
clarity as more entities and relationships are added. Once the set of entities
has been identified and added to the model,you should review the model to
make sure that the model will conform to the system requirements. Later,once
the data model is complete,these entities will become tables that you will
create in the database.


        Database Basic & Advance Courses by Dip Mail me at
                                   dip.ray@plentynum.com                            9
Attributes

Once the entities have been identified and added to the data model,you can
decide on the exact details for each entity that should be stored. At a minimum,
these details should fully support the initial system requirements,but you can also
include any additional details that you feel would contribute to the overall quality
of the system. Perhaps you see the opportunity to provide additional functionality
that might prove useful later on,such as a timestamp to store the most recent
time each customer signed onto the system.

First,you should build a list of attributes per entity using words that are simple,
but fully explain the exact purpose of the attribute. The attributes you decide on
will become the columns of the tables. If the columns are named properly early
in the design process,later users will not have to guess what a column is for.
Once clear attribute names have been identified,some people choose to convert
these names into appropriate column names.


             Database Basic & Advance Courses by Dip Mail me at
                                        dip.ray@plentynum.com                  10
Following Figure shows the college student registration system with attributes.

       STUDENT
                                                        CLASS
       STUD_ID
                                                   CLASS_ID
       L_NAME                                                     SUBJECT
                                                  SEMESTER
       F_NAME
                                                 CLASS_NAME
      ADDR_LINE                                                  SUBJECT_ID
                                                   SUBJECT
         CITY                                                   SUBJECT_NAME
                                                  LOCATION
         PIN                                                    DEGREE_PROG
                                                  DURATION
        STATE
                                                 GRADE_LEVEL
      PHONE_NO


                                                 INSTRUCTOR

                                                   INTRUC_ID
                                                     L_NAME
                                                     FNAME


        Database Basic & Advance Courses by Dip Mail me at
                                   dip.ray@plentynum.com                11
Entities and Their Relationships

The relationships between entities is the focal point for the relational database
management system. Therefore,it is critical to understand how entity relationships
are defined and how these relationships are treated to preserve data integrity.

In a data model,to represent a relationship,you would simply draw a line connecting
two entities.

This indicates that in some way, shape or form, one or both entities influences the
other. However,this notation is simply not enough to provide a clear picture of the
implications of the relationship. You must also include the entities’ cardinality.




          Database Basic & Advance Courses by Dip Mail me at
                                     dip.ray@plentynum.com                    12
Cardinality
Cardinality refers to the quantity of entity instances that are allowed on either
side of the relationship and is represented by making certain notations directly on
the relationship lines between the entities.

Types of Relationships

There are three main types of relationships,depending on the cardinality of the
entities involved. These are:
• One-to-one (1:1)—Indicates that one instance of an entity must be associated
with exactly one instance of another entity.
• One-to-many (1:M)—Indicates that one instance of an entity may be associated
with one or more instances of another entity.
• Many-to-many (M:N)—Indicates that one or more instances of an entity may
be associated with one or more instances of another entity.




        Database Basic & Advance Courses by Dip Mail me at
                                   dip.ray@plentynum.com                    13
Cardinality Notations




  CUSTOMER                                          ORDER                  ITEM


The relationship between CUSTOMER and ORDER in Figure is a one-to- many
relationship; a single customer may have one or more orders. The relationship
between ORDER and ITEM is a many-to-many relationship; a single order may
contain multiple items,and a single item may be found on multiple orders. One-
to-one relationships are very rare, because such a relationship is simple one. If a
one-to-one relationship is found in a data model, the two entities can usually be
combined into a single entity without losing the meaningful value of the data.


        Database Basic & Advance Courses by Dip Mail me at
                                   dip.ray@plentynum.com                     14
Normalization

The theoretical concepts of Mathematical Set Theory and Relational Algebra
allowed a database designer to organize data in a systematic fashion by
simply defining how each piece of data related to another through a process
called data normalization.

The purpose of normalization is to build a data model according to system
requirements and to make adjustments to the model to remove as many
design flaws as possible. The ultimate data model would provide
manageability so that a single piece of data can be updated in a single
location,and it would clearly show the relationships without ambiguity. All
design flaws and anomalies would be worked out of the design to allow the
most flexible database system without a single incident of redundancy. As
you can imagine, eliminating all anomalies is somewhat of a lofty goal and
is not often reached. As your data model moves closer to this goal,many
design anomalies and data management problems disappear.

    Database Basic & Advance Courses by Dip Mail me at
                               dip.ray@plentynum.com                   15
Strategy                 Software development Life cycle
  and
Analysis

                           Design



                                                Build and
                                                Document




                                                          Transition   Production



     Database Basic & Advance Courses by Dip Mail me at
                                dip.ray@plentynum.com                    16
Oracle10g offers a comprehensive high performance infrastructure needed to
develop, deploy, and manage Internet applications or e-business solutions as follows

• GRID COMPUTING, AUTOMATION, SELF-MANAGEMENT
• Scalability from departments to enterprise e-business sites
 Robust, reliable, available, secure architecture

 One development model, easy deployment options

 Leverage an organization’s current skill set throughout the Oracle platform

       (including SQL,PL/SQL, Java, and XML)
 One management interface for all applications

 Industry standard technologies, no proprietary lock-in




              Database Basic & Advance Courses by Dip Mail me at
                                         dip.ray@plentynum.com                  17
Structured Query Language (SQL)

The SQL in PL/SQL stands for structured query language. We use SQL to SELECT,
INSERT, UPDATE, or DELETE data. We use it to create and maintain objects and
users, and to control access rights to our instances.

SQL (pronounced as sequel or by its letter abbreviation) is the entrance, or
window, to the database. It is a fourth-generation language (4GL) that is intended
to be easy to use and quick to learn. The basic SQL syntax is not the creation of
Oracle. It actually grew out of the work done by Dr. E.F. Codd and IBM in the
early 1970s. The American National Standards Institute (ANSI) recognizes SQL
and publishes standards for the language.

Oracle supports ANSI-standard SQL but also adds its own twist in its SQL*Plus
utility. Through SQL*Plus, Oracle supports additional commands and capabilities
that are not part of the standard. SQL*Plus is a utility available in multiple forms:




          Database Basic & Advance Courses by Dip Mail me at
                                     dip.ray@plentynum.com                     18
SQL*Plus in Oracle accepts literally dozens of commands and
has even more environmental settings. Many of the commands
accept arguments that control the effects of the command.
Some of the more commonly used commands are listed below.

       CLEAR                                                HOST
      COLUMN                                                LIST
     CONNECT                                                RUN
        DEL                                                 SAVE
     DESCRIBE                                                SET
    DISCONNECT                                             SHOW
        EDIT                                            SHUTDOWN
      EXECUTE                                              SPOOL
        EXIT                                          START/STARTUP
        GET                                              SHOW ALL


 Database Basic & Advance Courses by Dip Mail me at
                            dip.ray@plentynum.com               19
Data Types                          Description
VARCHAR2 (SIZE)                     Variable-length character data
CHAR (Size)                         Fixed-length character data
NUMBER (p,s)                        Variable-length numeric data
DATE                                Date and Time Values
LONG                                Variable-length character data
                                    Up to 2 gigabytes
CLOB                                Character data up to 4 gigabytes
RAW and LONG RAW                    Raw Binary Data
BLOB                                Binary Data up to 4 gigabytes
BFILE                               Binary Data stored in an external file
                                    Up to 4 gigabytes
ROWID                               A 64 base number system representing
                                    the unique address of a row in its table

        Database Basic & Advance Courses by Dip Mail me at
                                   dip.ray@plentynum.com                       20
Database Objects                 Description
Table                            Basic Unit of Storage, Composed of Rows and Columns


View                             Logically represents subset of date from one or more
                                 tables

Sequence                         Numeric Value Generator

Index                            Improves the performance of some queries

Synonym                          Give alternative names of objects




           Database Basic & Advance Courses by Dip Mail me at
                                      dip.ray@plentynum.com                         21
Types of SQL Statements and their Representations
Select                            Data Retrieval
Insert
Update                             Data Manipulation Language (DML)
Delete
Merge
Create
Alter
Drop                              Data Definition Language (DDL)
Rename
Truncate
Commit
Rollback                           Transaction Control
Savepoint
Grant
Revoke                              Data Control Language (DCL)

            Database Basic & Advance Courses by Dip Mail me at
                                       dip.ray@plentynum.com          22
The Basic Command
                       SELECT column_list
                        FROM table_name;

    Filtering the Result Set
                                   SELECT column_list
                                   FROM table_name
                                   WHERE conditions;




Database Basic & Advance Courses by Dip Mail me at
                           dip.ray@plentynum.com        23
Using Arithmetic Operators with SQL Statements

    Operator                          Description
                   +                  Add
                   -                  Subtract
                   *                  Multiply
                   /                  Divide
    Example :

    Select last_name, salary, salary + 300
    From employees;



  Database Basic & Advance Courses by Dip Mail me at
                             dip.ray@plentynum.com     24
Oracle’s comparison operators are broken down into the following groups:

Simple comparison operators
Range comparison operators
Existence comparison operator
Similarity comparison operator
Null comparison operator

Regardless of the type of comparison operator that is used, the values that are
being compared must be of the same data type or an error will be returned. For
example,you cannot directly compare a NUMBER datatype to a DATE datatype.

Simple comparison operators test the condition of one value compared to another.
The Next Slide lists the comparison operators that are supported by Oracle.




         Database Basic & Advance Courses by Dip Mail me at
                                    dip.ray@plentynum.com                  25
Simple Comparison Operators
                                          A=B
                        A != B, A <> B, A ^= B
                                          A>B
                                          A<B
                                         A >= B
                                         A <= B

Database Basic & Advance Courses by Dip Mail me at
                           dip.ray@plentynum.com     26
Range Comparison Operators

                                              IN

                                ANY, SOME

                                           ALL

                      BETWEEN a AND b


Database Basic & Advance Courses by Dip Mail me at
                           dip.ray@plentynum.com     27
Existence Comparison Operators


Operator                                    Meaning
BETWEEN … AND ….                            Between Two Values
                                            (Inclusive)
IN (SET)                                    Match any of a list of Values
LIKE                                        Match a Character Pattern
IS NULL                                     Is a null Value




 Database Basic & Advance Courses by Dip Mail me at
                            dip.ray@plentynum.com                           28
Similarity Comparison Operators

Operator                       Meaning
AND                            Return TRUE if both components
                               Conditions are true
OR                             Return TRUE if either components
                               Condition is true
NOT                            Return TRUE if the following
                               Condition is false




      Database Basic & Advance Courses by Dip Mail me at
                                 dip.ray@plentynum.com            29
Obtaining Data from Multiple table using Join
           Conditions and the Filter Clause

You can write the join condition in the where clause, by prefixing
the column name with the table name when the same column
name appears in more than one table

Syntax is :

SELECT table1.column, table2.column
From table1, table2
Where table1.column1 = table2.column2;



         Database Basic & Advance Courses by Dip Mail me at
                                    dip.ray@plentynum.com     30
We are into training business since 10+ years and have trained
     more than 1000+ candidates in the field of Database, Some of them
     have given their valued opinion which can be looked into
     http://www.plentynum.com/testimonials_academy.html

     If you like us to contact you then fill up the form at
     http://plentynum.com/enquiry.html

     In case of any clarification / requirements you can mail the
     undersigned or call us at +91.99713 65346 (Delhi) / +91.99032
     69302 (Kolkata).


Disclaimer : Oracle and other product are registered trademark of their respective owners, this slide only is for help to an individual and we are nowhere
responsible for any error/fault coming from the said materials/slides


                         Database Basic & Advance Courses by Dip Mail me at
                                                    dip.ray@plentynum.com                                                                  31

Contenu connexe

En vedette

Opitarkvaraliigid vene
Opitarkvaraliigid veneOpitarkvaraliigid vene
Opitarkvaraliigid veneidavydova
 
Powerpoint 2
Powerpoint 2Powerpoint 2
Powerpoint 2finnlaura
 
Contenidos de tercer corte
Contenidos de tercer corteContenidos de tercer corte
Contenidos de tercer corteLORENA PEREZ
 
ใบงานที่ 2
ใบงานที่ 2ใบงานที่ 2
ใบงานที่ 2bussayamas1618
 
Apresentação prof luíz senna
Apresentação prof luíz sennaApresentação prof luíz senna
Apresentação prof luíz sennaDyone Andrade
 
Diretrizes obsesidade
Diretrizes obsesidadeDiretrizes obsesidade
Diretrizes obsesidadeLucia Tome
 
Environmental perspectives
Environmental perspectivesEnvironmental perspectives
Environmental perspectivesleecrowchild
 
Viejas glorias desde 1939 hasta 1971
Viejas glorias desde 1939 hasta 1971Viejas glorias desde 1939 hasta 1971
Viejas glorias desde 1939 hasta 1971Carlos Colomer
 
Traveler to journalist: how audience participation could become the new trave...
Traveler to journalist: how audience participation could become the new trave...Traveler to journalist: how audience participation could become the new trave...
Traveler to journalist: how audience participation could become the new trave...SMCFrance
 
Synergies between mitigation and adaptation..ppt glf nov 16
Synergies between mitigation and adaptation..ppt glf nov 16Synergies between mitigation and adaptation..ppt glf nov 16
Synergies between mitigation and adaptation..ppt glf nov 16Liz Kahurani
 

En vedette (20)

SMART Seminar: Massively Interacting Systems
SMART Seminar: Massively Interacting SystemsSMART Seminar: Massively Interacting Systems
SMART Seminar: Massively Interacting Systems
 
Folhetoeq1
Folhetoeq1Folhetoeq1
Folhetoeq1
 
Proposal
ProposalProposal
Proposal
 
Opitarkvaraliigid vene
Opitarkvaraliigid veneOpitarkvaraliigid vene
Opitarkvaraliigid vene
 
Family pics2august014
Family pics2august014Family pics2august014
Family pics2august014
 
學而知中文電子書
學而知中文電子書學而知中文電子書
學而知中文電子書
 
Folhetoeq1
Folhetoeq1Folhetoeq1
Folhetoeq1
 
Powerpoint 2
Powerpoint 2Powerpoint 2
Powerpoint 2
 
Contenidos de tercer corte
Contenidos de tercer corteContenidos de tercer corte
Contenidos de tercer corte
 
ใบงานที่ 2
ใบงานที่ 2ใบงานที่ 2
ใบงานที่ 2
 
Apresentação prof luíz senna
Apresentação prof luíz sennaApresentação prof luíz senna
Apresentação prof luíz senna
 
Engineering Services Forum L&T & A123 Systems
Engineering Services Forum L&T & A123 SystemsEngineering Services Forum L&T & A123 Systems
Engineering Services Forum L&T & A123 Systems
 
Diretrizes obsesidade
Diretrizes obsesidadeDiretrizes obsesidade
Diretrizes obsesidade
 
preview
previewpreview
preview
 
Environmental perspectives
Environmental perspectivesEnvironmental perspectives
Environmental perspectives
 
Onet m6 52 math
Onet m6 52  mathOnet m6 52  math
Onet m6 52 math
 
Viejas glorias desde 1939 hasta 1971
Viejas glorias desde 1939 hasta 1971Viejas glorias desde 1939 hasta 1971
Viejas glorias desde 1939 hasta 1971
 
Traveler to journalist: how audience participation could become the new trave...
Traveler to journalist: how audience participation could become the new trave...Traveler to journalist: how audience participation could become the new trave...
Traveler to journalist: how audience participation could become the new trave...
 
Onet m6 52 art
Onet m6 52  artOnet m6 52  art
Onet m6 52 art
 
Synergies between mitigation and adaptation..ppt glf nov 16
Synergies between mitigation and adaptation..ppt glf nov 16Synergies between mitigation and adaptation..ppt glf nov 16
Synergies between mitigation and adaptation..ppt glf nov 16
 

Similaire à Oracle fundamentals and sql

Bca examination 2015 dbms
Bca examination 2015 dbmsBca examination 2015 dbms
Bca examination 2015 dbmsAnjaan Gajendra
 
What Is Super Key In Dbms
What Is Super Key In DbmsWhat Is Super Key In Dbms
What Is Super Key In DbmsTheresa Singh
 
Kskv kutch university DBMS unit 1 basic concepts, data,information,database,...
Kskv kutch university DBMS unit 1  basic concepts, data,information,database,...Kskv kutch university DBMS unit 1  basic concepts, data,information,database,...
Kskv kutch university DBMS unit 1 basic concepts, data,information,database,...Dipen Parmar
 
Mapping objects to_relational_databases
Mapping objects to_relational_databasesMapping objects to_relational_databases
Mapping objects to_relational_databasesIvan Paredes
 
Database Lecture 3.pptx
Database Lecture 3.pptxDatabase Lecture 3.pptx
Database Lecture 3.pptxRUBAB79
 
Week 3 Classification of Database Management Systems & Data Modeling
Week 3 Classification of Database Management Systems & Data ModelingWeek 3 Classification of Database Management Systems & Data Modeling
Week 3 Classification of Database Management Systems & Data Modelingoudesign
 
Database management system
Database management systemDatabase management system
Database management systemedudivya
 
Database management system
Database management systemDatabase management system
Database management systemedudivya
 
Mi0034 database management system
Mi0034   database management systemMi0034   database management system
Mi0034 database management systemsmumbahelp
 
Database Management System(UNIT 1)
Database Management System(UNIT 1)Database Management System(UNIT 1)
Database Management System(UNIT 1)SURBHI SAROHA
 
Database Management System(UNIT 1)
Database Management System(UNIT 1)Database Management System(UNIT 1)
Database Management System(UNIT 1)SURBHI SAROHA
 
Database System Concepts AND architecture [Autosaved].pptx
Database System Concepts AND architecture [Autosaved].pptxDatabase System Concepts AND architecture [Autosaved].pptx
Database System Concepts AND architecture [Autosaved].pptxKoteswari Kasireddy
 
Bca3020 database management system
Bca3020   database management systemBca3020   database management system
Bca3020 database management systemsmumbahelp
 
Database Management System
Database Management SystemDatabase Management System
Database Management SystemNishant Munjal
 
introduction of database in DBMS
introduction of database in DBMSintroduction of database in DBMS
introduction of database in DBMSAbhishekRajpoot8
 
Database Systems Design, Implementation, and Manageme.docx
Database Systems Design, Implementation, and Manageme.docxDatabase Systems Design, Implementation, and Manageme.docx
Database Systems Design, Implementation, and Manageme.docxtheodorelove43763
 
Mi0034 database management system
Mi0034 database management systemMi0034 database management system
Mi0034 database management systemconsult4solutions
 

Similaire à Oracle fundamentals and sql (20)

Bca examination 2015 dbms
Bca examination 2015 dbmsBca examination 2015 dbms
Bca examination 2015 dbms
 
What Is Super Key In Dbms
What Is Super Key In DbmsWhat Is Super Key In Dbms
What Is Super Key In Dbms
 
Kskv kutch university DBMS unit 1 basic concepts, data,information,database,...
Kskv kutch university DBMS unit 1  basic concepts, data,information,database,...Kskv kutch university DBMS unit 1  basic concepts, data,information,database,...
Kskv kutch university DBMS unit 1 basic concepts, data,information,database,...
 
Mapping objects to_relational_databases
Mapping objects to_relational_databasesMapping objects to_relational_databases
Mapping objects to_relational_databases
 
Database Lecture 3.pptx
Database Lecture 3.pptxDatabase Lecture 3.pptx
Database Lecture 3.pptx
 
Week 3 Classification of Database Management Systems & Data Modeling
Week 3 Classification of Database Management Systems & Data ModelingWeek 3 Classification of Database Management Systems & Data Modeling
Week 3 Classification of Database Management Systems & Data Modeling
 
Database management system
Database management systemDatabase management system
Database management system
 
Database management system
Database management systemDatabase management system
Database management system
 
Mi0034 database management system
Mi0034   database management systemMi0034   database management system
Mi0034 database management system
 
Database Management System(UNIT 1)
Database Management System(UNIT 1)Database Management System(UNIT 1)
Database Management System(UNIT 1)
 
Database Management System(UNIT 1)
Database Management System(UNIT 1)Database Management System(UNIT 1)
Database Management System(UNIT 1)
 
Dbms unit i
Dbms unit iDbms unit i
Dbms unit i
 
Database System Concepts AND architecture [Autosaved].pptx
Database System Concepts AND architecture [Autosaved].pptxDatabase System Concepts AND architecture [Autosaved].pptx
Database System Concepts AND architecture [Autosaved].pptx
 
Dbms question (3)
Dbms question (3)Dbms question (3)
Dbms question (3)
 
Cs501 intro
Cs501 introCs501 intro
Cs501 intro
 
Bca3020 database management system
Bca3020   database management systemBca3020   database management system
Bca3020 database management system
 
Database Management System
Database Management SystemDatabase Management System
Database Management System
 
introduction of database in DBMS
introduction of database in DBMSintroduction of database in DBMS
introduction of database in DBMS
 
Database Systems Design, Implementation, and Manageme.docx
Database Systems Design, Implementation, and Manageme.docxDatabase Systems Design, Implementation, and Manageme.docx
Database Systems Design, Implementation, and Manageme.docx
 
Mi0034 database management system
Mi0034 database management systemMi0034 database management system
Mi0034 database management system
 

Dernier

Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 

Dernier (20)

Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

Oracle fundamentals and sql

  • 1. Introduction Describing the Life Cycle Development Phases Defining a Database Discussing the Theoretical, Conceptual, and Physical Aspects of a Relational Database Describing How a Relational Database Management System (RDBMS) Is Used to Manage a Relational Database Describing the Oracle Implementation of Both the RDBMS and the Object Relational Database Management System (ORDBMS) Describing How SQL Is Used in the Oracle Product Set Writing a Basic SQL Statement Describing the SQL Select Capabilities Executing a Basic Select Statement with the Mandatory Clauses Differentiating Between SQL and iSQL*Plus Commands Restricting and Sorting Data Limiting the Rows Retrieved by a Query Sorting the Rows Retrieved by a Query Database Basic & Advance Courses by Dip Mail me at dip.ray@plentynum.com 1
  • 2. Suggested Study Material : Oracle Database 10g SQL By: Jason Price › Publisher: McGraw-Hill/Osborne › ISBN: 9780070587557 › Edition: 1 - Pub Date: 13-APR-04 › www.tatamcgrawhill.com/html/9780070587557.html Database Basic & Advance Courses by Dip Mail me at dip.ray@plentynum.com 2
  • 3. DBMS is the collection of interrelated data and a set of program to access the data. DBMS allows only one person to access the data at a given point time. While the DBMS fulfilled the basic requirements of storing data,they were not a practical solution to efficiently storing,manipulating,and retrieving data quickly and easily. So based on the theory of relational data modeling by Dr. Edgar Codd publishes in the year 1970 , In 1977 Software Development Laboratories (SDL) formed by Larry Ellison, Bob Miner, Ed Oates and Bruce Scott with $2,000 of startup cash. Larry and Bob were working on a CIA project code-named "Oracle." In 1978 SDL changes its name to Relational Software Inc. (RSI) with CIA as the first customer. In 1982 RSI changes its name to Oracle Systems Corporation (OSC) and then simplifies the name to Oracle Corporation. Database Basic & Advance Courses by Dip Mail me at dip.ray@plentynum.com 3
  • 4. RDBMS manages large volumes of data while supporting a large number of users simultaneously. In a relational database,files do exist,but only as a medium to store data on disk. While a file processing system will only access a particular file when necessary to retrieve data,a relational database system will access all files simultaneously as one seamless system. The data that is stored in the database is completely independent of the files. The entire system is managed by a central database engine that processes queries and manipulates data on demand. A single query can retrieve the data regardless of where it is stored. Instead of merely acting as a journal of transactions,a relational database preserves the natural relationships that exist between real world entities and stores the data in this manner. Database Basic & Advance Courses by Dip Mail me at dip.ray@plentynum.com 4
  • 5. For example,data for a company’s employees is stored in a structure,with each employee stored only once. Data for the employees’ dependents may also need to be stored in another structure Each record for a dependent will contain a pointer which references its related employee. Figure in the next slide shows how the relational database preserves the relationships that occur naturally between employees and their dependents. Database Basic & Advance Courses by Dip Mail me at dip.ray@plentynum.com 5
  • 6. Dependen t1 EMPLOYEE 1 Dependen t2 Dependen t1 Dependen EMPLOYEE 2 t2 Dependen t3 EMPLOYEE 3 Database Basic & Advance Courses by Dip Mail me at dip.ray@plentynum.com 6
  • 7. As shown in the Figure, more dependents can be added to a single employee without storing the employee’s information over and over again. Data can also be stored for an employee that has no dependents whatsoever. If an employee leaves the company,deleting the employee would also automatically delete all data for the employee’s dependents. Since data is stored only once,if an employee moves to a new address,updating the data is only a matter of changing a single record. This configuration reduces data redundancy,which saves critical storage space, and still provides simplicity and ease in data management. An additional benefit of the RDBMS is that it is self-describing. The database contains not only users’ data,but also a description of its own structure, which is commonly referred as metadata. Database Basic & Advance Courses by Dip Mail me at dip.ray@plentynum.com 7
  • 8. Entity-Relationship Model Entities An entity is the person,place,thing,or abstract concept that you want to track in the database. When building the data model,the first thing to do is identify all the required entities based on the initial system requirements that were determined during the analysis phase. Each entity must be clearly defined to avoid ambiguity and design flaws. You should first build a simple list of the entities, and then add each one to the data model. In the James Martin data model,entities are represented by squares with rounded corners and are labeled with their names. Database Basic & Advance Courses by Dip Mail me at dip.ray@plentynum.com 8
  • 9. Below Figure shows a data model with a few example of entities for a student registration system for a college. STUDENT CLASS SUBJECT INSTRUCTOR Since each entity in a data model should only represent a single instance of the entity,the name of each entity should be listed in its singular form. The design should only show how one single entity relates to another single entity. The entities can be placed anywhere in the data model and can be adjusted for clarity as more entities and relationships are added. Once the set of entities has been identified and added to the model,you should review the model to make sure that the model will conform to the system requirements. Later,once the data model is complete,these entities will become tables that you will create in the database. Database Basic & Advance Courses by Dip Mail me at dip.ray@plentynum.com 9
  • 10. Attributes Once the entities have been identified and added to the data model,you can decide on the exact details for each entity that should be stored. At a minimum, these details should fully support the initial system requirements,but you can also include any additional details that you feel would contribute to the overall quality of the system. Perhaps you see the opportunity to provide additional functionality that might prove useful later on,such as a timestamp to store the most recent time each customer signed onto the system. First,you should build a list of attributes per entity using words that are simple, but fully explain the exact purpose of the attribute. The attributes you decide on will become the columns of the tables. If the columns are named properly early in the design process,later users will not have to guess what a column is for. Once clear attribute names have been identified,some people choose to convert these names into appropriate column names. Database Basic & Advance Courses by Dip Mail me at dip.ray@plentynum.com 10
  • 11. Following Figure shows the college student registration system with attributes. STUDENT CLASS STUD_ID CLASS_ID L_NAME SUBJECT SEMESTER F_NAME CLASS_NAME ADDR_LINE SUBJECT_ID SUBJECT CITY SUBJECT_NAME LOCATION PIN DEGREE_PROG DURATION STATE GRADE_LEVEL PHONE_NO INSTRUCTOR INTRUC_ID L_NAME FNAME Database Basic & Advance Courses by Dip Mail me at dip.ray@plentynum.com 11
  • 12. Entities and Their Relationships The relationships between entities is the focal point for the relational database management system. Therefore,it is critical to understand how entity relationships are defined and how these relationships are treated to preserve data integrity. In a data model,to represent a relationship,you would simply draw a line connecting two entities. This indicates that in some way, shape or form, one or both entities influences the other. However,this notation is simply not enough to provide a clear picture of the implications of the relationship. You must also include the entities’ cardinality. Database Basic & Advance Courses by Dip Mail me at dip.ray@plentynum.com 12
  • 13. Cardinality Cardinality refers to the quantity of entity instances that are allowed on either side of the relationship and is represented by making certain notations directly on the relationship lines between the entities. Types of Relationships There are three main types of relationships,depending on the cardinality of the entities involved. These are: • One-to-one (1:1)—Indicates that one instance of an entity must be associated with exactly one instance of another entity. • One-to-many (1:M)—Indicates that one instance of an entity may be associated with one or more instances of another entity. • Many-to-many (M:N)—Indicates that one or more instances of an entity may be associated with one or more instances of another entity. Database Basic & Advance Courses by Dip Mail me at dip.ray@plentynum.com 13
  • 14. Cardinality Notations CUSTOMER ORDER ITEM The relationship between CUSTOMER and ORDER in Figure is a one-to- many relationship; a single customer may have one or more orders. The relationship between ORDER and ITEM is a many-to-many relationship; a single order may contain multiple items,and a single item may be found on multiple orders. One- to-one relationships are very rare, because such a relationship is simple one. If a one-to-one relationship is found in a data model, the two entities can usually be combined into a single entity without losing the meaningful value of the data. Database Basic & Advance Courses by Dip Mail me at dip.ray@plentynum.com 14
  • 15. Normalization The theoretical concepts of Mathematical Set Theory and Relational Algebra allowed a database designer to organize data in a systematic fashion by simply defining how each piece of data related to another through a process called data normalization. The purpose of normalization is to build a data model according to system requirements and to make adjustments to the model to remove as many design flaws as possible. The ultimate data model would provide manageability so that a single piece of data can be updated in a single location,and it would clearly show the relationships without ambiguity. All design flaws and anomalies would be worked out of the design to allow the most flexible database system without a single incident of redundancy. As you can imagine, eliminating all anomalies is somewhat of a lofty goal and is not often reached. As your data model moves closer to this goal,many design anomalies and data management problems disappear. Database Basic & Advance Courses by Dip Mail me at dip.ray@plentynum.com 15
  • 16. Strategy Software development Life cycle and Analysis Design Build and Document Transition Production Database Basic & Advance Courses by Dip Mail me at dip.ray@plentynum.com 16
  • 17. Oracle10g offers a comprehensive high performance infrastructure needed to develop, deploy, and manage Internet applications or e-business solutions as follows • GRID COMPUTING, AUTOMATION, SELF-MANAGEMENT • Scalability from departments to enterprise e-business sites  Robust, reliable, available, secure architecture  One development model, easy deployment options  Leverage an organization’s current skill set throughout the Oracle platform  (including SQL,PL/SQL, Java, and XML)  One management interface for all applications  Industry standard technologies, no proprietary lock-in Database Basic & Advance Courses by Dip Mail me at dip.ray@plentynum.com 17
  • 18. Structured Query Language (SQL) The SQL in PL/SQL stands for structured query language. We use SQL to SELECT, INSERT, UPDATE, or DELETE data. We use it to create and maintain objects and users, and to control access rights to our instances. SQL (pronounced as sequel or by its letter abbreviation) is the entrance, or window, to the database. It is a fourth-generation language (4GL) that is intended to be easy to use and quick to learn. The basic SQL syntax is not the creation of Oracle. It actually grew out of the work done by Dr. E.F. Codd and IBM in the early 1970s. The American National Standards Institute (ANSI) recognizes SQL and publishes standards for the language. Oracle supports ANSI-standard SQL but also adds its own twist in its SQL*Plus utility. Through SQL*Plus, Oracle supports additional commands and capabilities that are not part of the standard. SQL*Plus is a utility available in multiple forms: Database Basic & Advance Courses by Dip Mail me at dip.ray@plentynum.com 18
  • 19. SQL*Plus in Oracle accepts literally dozens of commands and has even more environmental settings. Many of the commands accept arguments that control the effects of the command. Some of the more commonly used commands are listed below. CLEAR HOST COLUMN LIST CONNECT RUN DEL SAVE DESCRIBE SET DISCONNECT SHOW EDIT SHUTDOWN EXECUTE SPOOL EXIT START/STARTUP GET SHOW ALL Database Basic & Advance Courses by Dip Mail me at dip.ray@plentynum.com 19
  • 20. Data Types Description VARCHAR2 (SIZE) Variable-length character data CHAR (Size) Fixed-length character data NUMBER (p,s) Variable-length numeric data DATE Date and Time Values LONG Variable-length character data Up to 2 gigabytes CLOB Character data up to 4 gigabytes RAW and LONG RAW Raw Binary Data BLOB Binary Data up to 4 gigabytes BFILE Binary Data stored in an external file Up to 4 gigabytes ROWID A 64 base number system representing the unique address of a row in its table Database Basic & Advance Courses by Dip Mail me at dip.ray@plentynum.com 20
  • 21. Database Objects Description Table Basic Unit of Storage, Composed of Rows and Columns View Logically represents subset of date from one or more tables Sequence Numeric Value Generator Index Improves the performance of some queries Synonym Give alternative names of objects Database Basic & Advance Courses by Dip Mail me at dip.ray@plentynum.com 21
  • 22. Types of SQL Statements and their Representations Select Data Retrieval Insert Update Data Manipulation Language (DML) Delete Merge Create Alter Drop Data Definition Language (DDL) Rename Truncate Commit Rollback Transaction Control Savepoint Grant Revoke Data Control Language (DCL) Database Basic & Advance Courses by Dip Mail me at dip.ray@plentynum.com 22
  • 23. The Basic Command SELECT column_list FROM table_name; Filtering the Result Set SELECT column_list FROM table_name WHERE conditions; Database Basic & Advance Courses by Dip Mail me at dip.ray@plentynum.com 23
  • 24. Using Arithmetic Operators with SQL Statements Operator Description + Add - Subtract * Multiply / Divide Example : Select last_name, salary, salary + 300 From employees; Database Basic & Advance Courses by Dip Mail me at dip.ray@plentynum.com 24
  • 25. Oracle’s comparison operators are broken down into the following groups: Simple comparison operators Range comparison operators Existence comparison operator Similarity comparison operator Null comparison operator Regardless of the type of comparison operator that is used, the values that are being compared must be of the same data type or an error will be returned. For example,you cannot directly compare a NUMBER datatype to a DATE datatype. Simple comparison operators test the condition of one value compared to another. The Next Slide lists the comparison operators that are supported by Oracle. Database Basic & Advance Courses by Dip Mail me at dip.ray@plentynum.com 25
  • 26. Simple Comparison Operators A=B A != B, A <> B, A ^= B A>B A<B A >= B A <= B Database Basic & Advance Courses by Dip Mail me at dip.ray@plentynum.com 26
  • 27. Range Comparison Operators IN ANY, SOME ALL BETWEEN a AND b Database Basic & Advance Courses by Dip Mail me at dip.ray@plentynum.com 27
  • 28. Existence Comparison Operators Operator Meaning BETWEEN … AND …. Between Two Values (Inclusive) IN (SET) Match any of a list of Values LIKE Match a Character Pattern IS NULL Is a null Value Database Basic & Advance Courses by Dip Mail me at dip.ray@plentynum.com 28
  • 29. Similarity Comparison Operators Operator Meaning AND Return TRUE if both components Conditions are true OR Return TRUE if either components Condition is true NOT Return TRUE if the following Condition is false Database Basic & Advance Courses by Dip Mail me at dip.ray@plentynum.com 29
  • 30. Obtaining Data from Multiple table using Join Conditions and the Filter Clause You can write the join condition in the where clause, by prefixing the column name with the table name when the same column name appears in more than one table Syntax is : SELECT table1.column, table2.column From table1, table2 Where table1.column1 = table2.column2; Database Basic & Advance Courses by Dip Mail me at dip.ray@plentynum.com 30
  • 31. We are into training business since 10+ years and have trained more than 1000+ candidates in the field of Database, Some of them have given their valued opinion which can be looked into http://www.plentynum.com/testimonials_academy.html If you like us to contact you then fill up the form at http://plentynum.com/enquiry.html In case of any clarification / requirements you can mail the undersigned or call us at +91.99713 65346 (Delhi) / +91.99032 69302 (Kolkata). Disclaimer : Oracle and other product are registered trademark of their respective owners, this slide only is for help to an individual and we are nowhere responsible for any error/fault coming from the said materials/slides Database Basic & Advance Courses by Dip Mail me at dip.ray@plentynum.com 31