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: Advise needed: Can I use/learn Oracle quickly?

Re: Advise needed: Can I use/learn Oracle quickly?

From: Erwin Moller <since_humans_read_this_I_am_spammed_too_much_at_spamyourself.com>
Date: Fri, 13 Feb 2004 13:51:47 +0100
Message-Id: <402cc857$0$564$e4fe514c@news.xs4all.nl>


whisky is life wrote:

Hi whisky,

Thanks for your time.

> Erwin,
>
> I have got to say that the reaction from people here towards your question
> is absolutely appaling.
>
> I started on Oracle Databases knowing only MS SQL 6.5.
>
> I have worked fine for nearly 2 years with Procedures, SQL statements,
> calls etc all sorts with no problems whatsoever - I slowly learnt things
> that were different with PL SQL and SQL calls but generally you can get
> away with NORMAL SQL when querying the database.
>
> Erwin, I believe you can apply basic SQL to your teachings when passing on
> this BASIC knowledge to your colleagues and they will be able to query the
> Oracle database fine without problems.

That is good. :-)

>
> Oracle is no different from any other database. It has its own little
> querks that 'experts' will no about like any other database. There is no
> mystical magic to it, its a database, that happens to be quite good.
>
> Any muppet can learn it to a reasonable level (not DBA work) in a short
> time span as it basics are the same as any other database. Use toad with
> it and it becomes childs play.

I'll look into TOAD.

>
> Table creation is simple CREATE TABLE (field <datatype>, etc, etc, PRIMARY
> KEY (field));
>
> Creating a primary key automatically indexes that table on that field.
>
> For auto number fields you assign a sequence which is in no way related to
> the table.
>
> CREATE SEQUENCE SEQ_MY SEQ INCREMENT BY 1 NOMAXVALUE;
> then create a public view of that sequence for use by other schemas
> CREATE PUBLIC SYNONYM SEQ_MY_SEQ FOR SEQ_MY_SEQ;
>
> GRANT ALL ON SEQ_MY_SEQ TO <schema>;
>
> Then to get a new number (autonumber) you code
>
> SELECT SEQ_MY_SEQ.NEXTVAL from DUAL

Hey! That is almost the same as in PostgreSQL. :-) Good. I feel a little familiar with that.

In PostgreSQL we use something like this: we make the autonumber field to DEFAULT to: nextval('public.tblsometable_somecolumn_seq'::text)

where tblsometable_somecolumn_seq is the sequence and nextval a function that takes care of the (short) lock and increasing. When we choose the 'serial' datatype a sequence is automatically created, but you can also do it by hand.
I read in my Postgresqlbook (Practical PostgreSQL by O'Reilly) that the developers where aiming to let PostgreSQL compete with Oracle in functionality, and now when I see the Oracleway of creating sequences I can see the PostgreSQL developers did use some of that.

>
> Datatypes are similar - VARCHAR2, NUMBER, DATE etc.
>
> Select statements are the same SELECT.....FROM.....WHERE.....etc
> Update statements are the same UPDATE...table....SET....WHERE....etc
> Insert statements are the same INSERT INTO....table....(fields) VALUES
> (values);

Great, I can handle that. :-)

>
> This isnt the DBA's way of doing things because tablespaces etc need to be
> calculated, table sizes etc but for a simple starter in using Oracle it is
> fine.
>
> Its not rocket science.
>
> You go teach your colleagues simple SQL Erwin and they can quite happily
> interogate an Oracle database with basic SQL.
>
> What I wont vouch for is the state that the database will be in without a
> professional DBA to administor it.

Yeah, I figured that too.
I think I will ask the administrator to set up our own database/namespace or how that is called in Oracle, so we cannot mess up something that is in a productiondatabase.

Thanks a lot for your kind advise, whisky!

Regards,
Erwin Moller

PS: By the way, my favorite is Poit Dhubh (pronounced ?potch ghoo?).

>
> Anyway,
> thats my tupence worth.
>
Received on Fri Feb 13 2004 - 06:51:47 CST

Original text of this message

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