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

Home -> Community -> Usenet -> c.d.o.server -> Re: Differences between Oracle RDBMS and MS SQL Server

Re: Differences between Oracle RDBMS and MS SQL Server

From: steve <E_at_E.COM>
Date: Fri, 8 Dec 2000 08:37:17 +0800
Message-ID: <1elbb22.6ldook15va94sN%E@E.COM>

Hi,

bitwise ops are useful.
consider you have a customer/supplier address database along with each record you have a bit field

hasinvoice (bit1)
hasQareport (bit2)
haspakinginfo (bit3)

by simply checking 1 field , if the field is not zero you know not to allow a delete of the customer record, also if you add extra bit fields you don't have to go into the supplier record maintanance code to make changes, since zero is always zero.

so if I added a bit4 or 5 etc, no change to my address maintanance code.

the alternative is to have 1 field storing each flag, so I would need 4 fields for the above, and code to check each for being zero, as well as having to modify my code every time i added a field.

steve

Mike Krolewski <mkrolewski_at_rosetta.org> wrote:

> In article <MPG.1496338f85d2a3eb9896a9_at_news.bitstream.net>,
> tdkannel_at_bitstream.net (Tim Kannel) wrote:
> > > As an Oracle developer writing SQL Server, I have come across
 numerous
> > > points where SQL Server's SQL cannot perform the task...
> >
> > Just the opposite for me...
> >
> > - Oracle's handling of date/time strings is much less flexible than
> > SQL server
> > - Oracle has too many stupid restrictions, like 30-character
 identifiers
> > - AFAIK, Oracle has no equivalent to SQL server's "top n" in select
 clause
> > (rownum comparisons don't count)
> > - Oracle doesn't have bitwise operations like SQL server
> > - Oracle doesn't support "x=y" column aliasing ("y as x" is harder
> > to read, IMO)
> >
> > P.S. any corrections or suggestions about what I said above would
> > be appreciated.
> >
> > --
> > Tim Kannel
> > TCAP 3.1 - Captures console I/O to a file
> > ftp://ftp.simtel.net/pub/simtelnet/msdos/sysutl/tcap31.zip
> >
>
> On handling time and date; I think SQL Servers' several different
> classes for time, date and time/date are very useful. I would suggest
> that the date handling functions in Oracle are as good as anyone else. I
> really like the idea of adding days to a date, last_day() to return last
> day of month associated with date, and add_month(). I think SQL Server
> has the 'rr' notion available in Oracle -- +/- 50 years of the current
> year eg 02 is 2002 and 98 is 1998 versus 2002 and 2098 for 'yy'.
>
> On 'top n', SQL Server using top n% is interesting. However, in 10 years
> of writing database code, I can only recall needing it once or twice. In
> addition, if one is writing reports with Oracle's Report Writer, it is a
> built feature.
>
> Currently it does not have bitwise comparison (?) However with functions
> and now with Oracle's object classes on could develop you own. I am not
> sure if there is a great need for this feature. Where does one use/need
> a bitwise operator? I really cannot think of a specific case.
>
> On the column aliasing, I do not believe you need to use ' as ',
> Oracle's default is to presume that the second term in a field
> definition is an alias. It can lead to some problems if you forget a
> comma. It happens to me more often than I want to admit.
>
> On the Oracle restriction on variable length restriction of 30
> character, I agree it is a bit silly. Than again, I generally do not run
> out of characters for fields; occassionally for table names. Afterall,
> you have to type them occasionally.
>
>
> --
> Michael Krolewski
> Rosetta Inpharmatics
> mkrolewski_at_rosetta.org
> Ususual disclaimers
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Thu Dec 07 2000 - 18:37:17 CST

Original text of this message

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