Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle newbie - few questions

Re: Oracle newbie - few questions

From: Karsten Farrell <kfarrell_at_belgariad.com>
Date: Thu, 02 Jan 2003 17:15:12 GMT
Message-ID: <As_Q9.1011$pa7.84642930@newssvr17.news.prodigy.com>


Comments embedded.
Damir Dezeljin wrote:
> Hi.
>
> I have to produce a simple 'sale system' in Oracle as homework for a course
> of Information system on my faculty.
>
> While I have a lot of experience with MySQL, C, PHP and other programming
> langages, I started to 'fight' with Oracle and Oracle forms some days ago ;)
> Is there anyone who can explain me something:
> - First the more important ... is there an online 'quick guide' with
> exercises or something similar on using ORACLE, FORM BUILDER,...?
> BTW: I'm using Oracle Developer 6.0?
Since Oracle is the #1 database in the universe (according to Oracle literature), there are plenty of books. However, most of them are about the database itself, not the tools like Forms. You can read all of the doc set online at http://tahiti.oracle.com (but it can be a bit daunting for a beginner to read all of it).

> - The realy basics of TABLESPACEs? This is something new for me and I don't
> understand the explanation from the manual?
> Are TABLESPACEs something similar to databases in MySQL and if so, how
> can I specify the TABLESPACE in which I will create objects (e.g. tables)?
> How are different tablespaces used?

Tablespaces are the logical equivalent of datafiles. That is, they are a collection of one or more datafiles. If a tablespace has only one datafile, you can think of them as equivalent (though you specify different parameters for them).

An Oracle schema is the closest thing to a MySQL database.

> - How can I see what objects I created and what I can access trough my
> account. I already know that I can get some information by issuing:
> 'SELECT * FROM cat;', but I want some other things like tablespaces,...?
There are a series of views that give you information about everything in the data dictionary. They each have a prefix that identifies how global of a picture you want - USER_xxx for objects you own, ALL_xxx for objects you can access (may include objects owned by another user), and DBA_xxx for all objects in the database (not everyone can access these views). You might begin with USER_TABLES, USER_TABLESPACES, USER_INDEXES, and branch out from there (or go to the USER_OBJECTS view). To see what metadata these views contain, type 'DESC <viewname>'.

> - How can I get a detailed description of tables. With
> 'DESCRIBE TABLE <table>;' I only get a basic description - there aren't
> mentioned indexes, foreing keys,...?
> Is there a tool (posibly free or with a demo) that I can use to get a
> graphical description of tables, integryty relations,... (I used Access
> with ODBC drivers to get table descriptions - INDEXES,...)?
There is no universal tool. Some GUI products help (like TOAD). Most people end up writing SQL scripts that gather the information they're interested in (using the views mentioned above). The books and the web contain many examples of these scripts (do a Google search for what you're interested in).

> - Is there anything similar to 'AUTOINCREMENT' type in other databases (I
> know about SQUENCES, but is this the only thing to use PRIMARY KEY)?
Sequences are not the only thing you can use as a primary key, but they are one of the most popular (if you don't have a natural key available). Sequences are the Oracle equivalent of an autoincrement type.

> - How can different users have different data in tables of SAME name in
> the TABLESPACE with SAME name?

Each Oracle userid can have their own set of objects (which makes them a schema owner userid). For example, in the Oracle demo tables, the Scott userid has an EMP table. I can create another userid - let's say Tiger - that also has an EMP table. If I am Tiger, I can look at my own EMP table like this: 'select * from emp'. If I am Tiger and Scott has granted me access to his EMP table, I can look at his EMP table like this: 'select * from scott.emp'.

>
> Thank you in advance.
>
> Regards,
> Dezo
>

Other members of this NG will have a different viewpoint. Received on Thu Jan 02 2003 - 11:15:12 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US