Oracle Table Creation Steps

of course you must install oracle first here's how!


Create Tables

the process goes like this:
1. create database, ex. mstolz ... use dbassist
2. then you create tablespaces in which the tables will exist ... these spaces go hand in hand with .dbf physical files located on the system ... note that a .dbf file can not contain more than 1 tablespace, but a table space can go across multiple .dbf files ...
3. then you create the tables

SQL Plus commands

dbassist will create several .dbf files that are used among several tablespaces - 
one for rollback, reports, user data, system data, logs, and temp data




create user reg identified by reg;
grant connect, resource, unlimited tablespace to reg;
alter user reg default tablespace users;     
    # this gives reg the ability to create/manage tables in the "users" tablespace
alter user reg temporary tablespace temp;

connect reg/reg;


create table registration (
sku varchar2(8),
register_201 varchar(30)
register_202 varchar(30)
register_203 varchar(30)
)

in order to connet to the database from a servlet you need to run the oracle listener ... do this by typing in "lsnrctl start" as the oracle8i ... you can use netasst to create default config file located in $ORACLE_HOME/network/admin/

Drop Tables

connect to SQL Plus as user

Connected.
SQL> drop table registration;
create table registration (
reg_number int(4) CONTRAINT UNIQUE,
reg_date date
)


alter rollback segment r01 online;

create sequence registration;