Oracle
  Home arrow Oracle arrow Creating a Table using Oracle 10G XE
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

Creating a Table using Oracle 10G XE
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 18
    2006-09-19

    Table of Contents:
  • Creating a Table using Oracle 10G XE
  • Creating a table
  • Creating a table using the Wizard
  • Creating a table using the Wizard, continued

  • 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

    Virtual Tradeshows by Ziff Davis Enterprise - A Unique Opportunity to Connect with IT Experts, Access Information, and Gain Insight on today's Technology

    Creating a Table using Oracle 10G XE
    (Page 1 of 4 )

    Oracle 10G XE provides a wizard to help you create a table. The wizard walks you through several steps for creating a table, taking you to the next step after you have entered valid entries for the current step. While scripts can be used to create a table, creating a table using the visual, form-based creation process is a lot simpler and less prone to errors. This tutorial describes a table to be created in the HR database with all the necessary ingredients for a typical database.

    Table is crucial

    A table is an essential element of any relational database management system. Data stored in the columns and rows of a table, and the relationship that may exist between the various tables, is at the core of RDBMS. The creator of the table becomes the owner of the table. An owner cannot have two tables with the same name. Some of the other dos and don'ts for creating a table are:

    The table name cannot use any of the keywords used in the system
    It cannot be a combination of two names separated by a white space
    The maximum length of a table is 28 characters.
    The table name's first character should be alphabetic
    The table name's other characters better be confined to numbers and 
    underscores

    In any case, if and when you violate the rules you do get a error message telling you what was wrong. In that sense, you are covered. Since the Wizard tells you immediately what is wrong in some cases, you know what you have to do to correct it.

    We will start with a very simple example of creating just one table called Htek_Employees for the Htek company. The Employee table will consist solely of the Employee information such as:

    First_Name
    Last_Name
    Hire_Date
    Birth_Date
    Title
    Salary
    Address 
    City 
    State
    Zip
    Home_Phone
    Office_Phone_Phone
    Cell_Phone
    Email
    Health_Coverage
    Notes
    

    Columns in the table

    In addition to this, to associate this information uniquely to an individual an Employee_ID is also added. This table will have 16 columns. The 16 columns are the attributes of the Employee physically stored in a table. A row in the table may contain values for each of these columns. For example, for an employee whose Employee_ID is 1, the details are:

    First_Name; John
    Last_Name; Newcomb
    Hire_Date: 2/1/1998
    Birth_Date: 1/1/1980
    Salary: $40000
    Title: Supervisor
    Address: 123 Cox Street
    City: Princeville
    State: NJ
    ZIP: 08536
    Home Phone: (738)123-1235
    Office Phone: (738)234-2335
    Call Phone: (981)222-2345
    Email: jnewcomb@htek.com
    Health Coverage (Yes/No): Yes
    Notes: Dependable reliable employee
    

    If the Employee_ID is known, everything about this employee should be available from this table.

    Column Data Types

    For each column in the above table, the type of information it contains is different. While names are represented by 'text', hire_date and birth_date consists of 'date' type information. The salary contains 'money' type information. Telephone numbers and the Zip code consists of numerals, but they are not number type; who will ever think of adding two zip codes, or subtracting one telephone number from another? So these are no different than names. So the different columns may be stored as different data types. The Oracle table designer gives you options from which you can choose the data type that you may want to assign.

    More Oracle Articles
    More By Jayaram Krishnaswamy


       · Tables are really basic for an RDBMS. They can be created using script as well as...
     

       

    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 5 hosted by Hostway