Oracle
  Home arrow Oracle arrow Oracle Database Fundamentals
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ORACLE

Oracle Database Fundamentals
By: Mamun Zaman
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 47
    2007-05-01

    Table of Contents:
  • Oracle Database Fundamentals
  • Creating Database Tables
  • Inserting Data
  • Selecting Data
  • Updating Data

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    TestComplete™ automates software testing for a fraction of what the big guys charge. Easy functional and load testing for all Windows, .NET, Java and Web apps. Download a free trial now.

    Oracle Database Fundamentals
    (Page 1 of 5 )

    In this article we will mainly focus on basic database development using Oracle. We will learn how to create new tables, alter them, insert data into the database, update data, retrieve data, delete data and drop tables. We have lots to do, so let's get started.

    We will start with the widely used Oracle example of an employee information database. We can store all the information in a table like the one below where each row will represent an employee, and each column will represent employee attributes.

    ID

    First Name

    Last Name

    Address

    Phone

    Joining Date

    Salary

    Dept

    Manager

    1

    Tom

    Tykwar

    Avenue A

    7126545

    20-Apr-04

    10000

    Sales

     

    2

    Joel

    Coen

    Street 20, Avenue B

    7120045

    10-Mar-04

    20000

    Sales

    Tom

    3

    Ethan

    Coen

    Street 20, Avenue B

    7120145

    20-May-06

    5000

    Sales

    Tom

    4

    Stanley

    Kubrick

     

    7006545

    2-Jan-07

    20000

    Marketing

     

    5

    Martin

    Scorsese

     

    7100545

    12-Apr-04

    10000

    Marketing

    Stanley

    6

    Tim

    Burton

     

    7126987

    7-Dec-05

    20000

    Marketing

    Stanley

    7

    Gore

    Verbinski

     

    7121145

    7-Nov-05

    12000

    HR

     

    8

    Chris

    Nolan

     

    8126545

    7-Oct-05

    18000

    HR

    Gore

    But if you look closely at the table above, you can see data duplication in the department and manager columns. There will be a manager in each department, and s/he will be the supervisor for all the employees of that department. This duplication of information is not a major concern for the above table. But it would be if there were a huge number of entries in this table. We can divide this table into the following two tables which will minimize the duplication of data.

    Department Table:

    Dept

    EmpID

    DeptID

    Sales

      1

    1

    Marketing

    4

    2

    HR

    7

    3



    Employee Table:

    EmpID

    First Name

    Last Name

    Address

    Phone

    Joining Date

    Salary

    Dept ID

    1

    Tom

    Tykwar

    Avenue A

    7126545

    20-Apr-04

    10000

    1

    2

    Joel

    Coen

    Street 20, Avenue B

    7120045

    10-Mar-04

    20000

    1

    3

    Ethan

    Coen

    Street 20, Avenue B

    7120145

    20-May-06

    5000

    1

    4

    Stanley

    Kubrick

     

    7006545

    2-Jan-07

    20000

    2

    5

    Martin

    Scorsese

     

    7100545

    12-Apr-04

    10000

    2

    6

    Tim

    Burton

     

    7126987

    7-Dec-05

    20000

    2

    7

    Gore

    Verbinski

     

    7121145

    7-Nov-05

    12000

    3

    8

    Chris

    Nolan

     

    8126545

    7-Oct-05

    18000

    3

    We have more than 10 million subscribers, so a proper database design is essential for us, otherwise it would be unmanageable.

    More Oracle Articles
    More By Mamun Zaman


       · if you provide information on triggers, views, and store procedures it is best
       · I'll write articles about view, triggers and PL/SQL...
     

       

    ORACLE ARTICLES

    - Tuning PL/SQL Code
    - Debugging PL/SQL Code
    - Testing PL/SQL Code
    - Working With PL/SQL Code
    - Conditional Compilation for Oracle Database ...
    - Compile-Time Warnings for Oracle DB 10g
    - Compiling PL/SQL Code for an Oracle Database
    - Troubleshooting PL/SQL Code
    - Managing PL/SQL Code
    - Data Manipulation and More for HTML DB Appli...
    - Oracle Database Fundamentals
    - Adding Processes to HTML DB Applications
    - Adding Computations, Processes, and Validati...
    - Sub-templates and More with Oracle HTML DB
    - Focusing on Templates in Oracle HTML DB




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway