• Alex Papadimoulis (unregistered)

    Okay, a little preemptive response to my criticism of nested tables. They are wholly unrelational and have as much place in a RDBMS as a hacksaw in a McDonald's Happy Meal.

    They are a complete maintenance nightmare. Don't believe me? Ask the DBA to make a change to your Nested Table column in your table of 1M records. Expect hysteric laughter and an update period measured in hours.

    They are completely unnecessary. Just as easy can a real table created, along with a relationship and appropriate FK constraints.

    They are useless for anything but retreival. The structure inside of a nested table is represented like tblCalendar on steroids(http://thedailywtf.com/archive/2004/06/11/262.aspx). Seriously. Want to find if an order was shipped to a previous address (as the example uses), just page through the paper invoices ... it will be faster and wont bring your DB down for the week.

    I consider this monstrosity a worse insult to computer science than Variable Variables ;-). But, just as VV have they're rare appropriate uses, Nested Tables do as well ... such as if you're shooting for an Object-Oriented Schema.

    But let's be realistic ... when it comes down to the real world, developers use them to avoid creating a new relation. Just as the linked example demonstrated.

  • random reader (unregistered)

    I feel so ashamed to admit that I have, indeed, done something similar. No, not an infinite loop, but I have (once) generated a random char in a loop till I reach desired_length.

    I still feel traumatized about that. I need therapy.

  • random reader (unregistered)

    Err.. generate random_char, concatenate, repeat till desired_length is reached, I meant.

  • Frans Bouma (unregistered)

    Nested tables.. whoa :D. Looks like the constructs you could/can do in teh uniVerse database! (now property of IBM)

    Almost as stupid: table aliasses in DB2: alias of table alias, of table alias of table alias of table alias....

    who cooks these features up?

  • Alex Beynenson (unregistered)

    radom reader: What's wrong with generating random characters until you have desired_length of them? Sounds like a fairly decent way to generate an arbitrarily large random string if you have a need for one and your dev. environment doesn't provide built-in support. If life gives you lemons...

  • Aarrgghh (unregistered)

    The most frightening thing about the nested tables issue is the guy who wrote the article Alex linked. Would you buy a used algorithm from this man?

    http://www.praetoriate.com/images/don_burleson.jpg

    Yeah, me neither. If Stereolab joined the Nazi Party, they'd put that guy on an album cover.

  • hahaha - the guys pic (unregistered)

    I thought the same thing when I saw his picture. One look and I said, "Would you trust this man?" My response, "Nope." He just looks like a scam, and certainly far from a DBA of any kind. Keep in mind, however, that the previous Q&A that I wrote was with myself while no one else was in the room....

  • skicow (unregistered)

    Sweet, another case of RTFM.

  • JiangZemin (unregistered)

    hee hee! that Oracle guy website is hilarious. pushing nested tables: "...and thats all there is to it." Then right after that is his support hotline number ("requires $500 credit card retainer").

  • Harlan (unregistered)

    You gotta love this on his site as well - another WTF:

    The solution to this problem is to enhance the standard SQLPlus prompt of “SQL>” to include the database name.

    ...

    Note that this prompt is set at entry to SQL
    Plus and it will not change if you connect to another database using the SQLPlus connect statement. The following example clarifies this limitation of the SQLPlus prompt.

    set ORACLE_SD=PROD;

    export ORACLE_SID

    sqlplus system/manager

    PROD> select name from v$database;

    PROD

    1 Row selected.

    PROD> connect system/manager@TEST

    Connected.

    PROD> select name from v$database;

    TEST

    1 Row selected.

    -----
    Now that helps!

  • Jeff S (unregistered)

    I'm sorry, but anytime I look at any Oracle code, I say "WTF" out loud.

  • Guayo (unregistered)

    @Jeff S
    and still PL/SQL is far superior to Transact-SQL

    @Alex Papadimoulis
    Although I never had the necessity to implement a nested table in Oracle I can’t agree that they compare to PHP’ variable variables, Yes they don’t fit to much in a relational database but Oracle is getting more and more OODBMS features, is that a bad thing? maybe but never the less OODBMS have a place and a purpose. I think a better comparison of nested tables would be against inner classes in OO languages. But anyway is just my opinion as is just your opinion.

    Regarding the posted code:
    All that I can say is that although the following code will be a lot faster than the while:

    out_num_rand := dbms_random.value(10000000, 99999999)

    The posted implementation would produce a more random value IMHO :-)

  • Alex Papadimoulis (unregistered)

    PL/SQL is a more powerful language, no doubt. All I'm gonna say is ... TOOLS! Seriously, version 10 .. and they can't come up with anything better than a command prompt?

  • ProffK (unregistered)

    I once converted a VB5 Access app to VB6 SQL Server, and discovered some code one day (I'll post it when I find it) where in order to generate a serial number for a deal the code worked as follows:

    start with a three digit string, "000".
    try and insert with that as a pk. If there is a duplicate key error, increment the number and repeat until the insert works.

    The way of incrementing the string is beyon belief, but that's a whole other WTF.



  • Simon Holt (unregistered)

    You don't need no steeenkin' tools with PL/SQL. :-) You can always get TOAD (and incurr the wrath of your DBA forever) if you really can't handle typing ;->

    Nested tables: They are the DEVILS invention, boy.

    Mr. Burleson: Scary.

  • Jonathan Perret (unregistered)

    Am I the only one to have noticed that apart from giving dubious advice, this M. Burleson also happens to have established what is possibly the most intrusive dress code ever :
    http://www.dba-oracle.com/dress_code.htm ?
    We're still debating around here whether it's all a joke.

  • Mr Proper (unregistered)

    "http://www.dba-oracle.com/dress_code.htm ?

    We're still debating around here whether it's all a joke. "

    If women stopped wearing skirts, society would CRUMBLE!

    Actually, it would be worth joining his company. Really. Just to be there the day he sends a female coworker home to shave her face.

  • BigJim (unregistered)

    LOL on the face-shaving comment!!

    Even better, you should see what kind of rates they get!

    http://www.dba-oracle.com/consulting_prices.htm

  • adml (unregistered)

    Hah

    The following Oracle consulting rates are for personal consulting by Donald Burleson.

    With more than two decades of Oracle consulting experience, Mr. Burleson is far more productive than ordinary Oracle consultants, and Burleson Consulting is one of the few Oracle consulting corporations to openly publish our Oracle consulting prices

    Per Diem $500 / hour

    Little ego stroke, eh? :)

  • Phil Scott (unregistered)

    My company has decided that the dress code page was made in jest. How can someone in one sentence say that you must wear a white shirt to look professional, and then go and have mustaches drawn on women in MS Paint and naked dudes on their website?


    I mean, how much more unprofessional can you get than having a picture of Nick Nolte's Mug Shot?

  • Ron (unregistered)

    seriously, the pl/sql compiler should be able to optimize that so easily

  • skicow (unregistered)

    I agree the the dress code must be a joke, he actually says 'no female consultants should smell like cheap whores'

  • Alex Papadimoulis (unregistered)

    I'm not sure if it's "Kidding On The Square" or unprofessionalism. Looking at the rest of the site, I'm inclined to think the latter. They may dress spiffy, but the site really doesn't convey it ...

  • Pete J (unregistered)

    @Frans & Alex

    Nested tables, or multi-valued attributes, to give them their MVDBMS name, are a useful construct if used in the correct way.

    Firstly, a MVDBMS uses delimiters between values, fields and records, not fixed length records. Consequently adding a field is a simple exercise - there is no constraint on the length of an individual record because of the use of delimiters, and no rebuild is required.

    Multi-valued fields work best when the data being recorded could be made up of a number of parts, such as an address (as a very simple example), or the parts on an order, lines on an invoice, etc.

    There are a number of MVDBMS, D3 from Pick Systems/Raining Data, jBase, uniVerse & unidata from IBM/Informix/VMark, to name just 4.

    I work with them day in, day out, so you would expect me to be biased :)

  • Donald K. Burleson (unregistered)
    1. Dirty, unprofressional hippies go nowhere in life. Why dont you all go back and GPL all your code. Meanwhile, I'll make 500/hour consulting.


    2. I require men and women to present a professional appearance while on client sites. Clean clothing and being clean-shorn is a primary requirement of working in my professional office. Additionally, it presents the client with the idea that we know what we are talking about.

    3. I am an expert in Oracle consulting. Do not question over 20 years of experience by 1st year college graduates (as most of you obviously are)

    I hope this clears up some confusion.
    Don
  • init6 (unregistered)

    "Do not question over 20 years of experience by 1st year college graduates"

    Do you realize it sounds like you have 20 first-year grad students doing all your work? If working for you is each student's part time job it might explain the WTF code posted at the top.

    I looked at your site. I'd never hire you. I agree in presenting a professional image during business engagments. I don't agree with coming across as a slob even in one's personal time. I tend to relate the two when I judge a person.

    Also with remarks like "I've also taken to working naked, and I find this very freeing, allowing me to express my inner Redneck. It's also ensures that people knock before entering my office." I wonder who is a hippy. It is interesting you also say "Consultants who are sloppy in appearance and manners will not be tolerated".

    PS: This reply may not be the best place for such discussion but it would be nice if a Google search for "Donald Burleson" found this thread.

  • Brendan (unregistered)

    One does have to wonder... if the above post claiming to be from Donald Burleson is really from him.

    If so, I love how he contradicts himself, demanding professionalism from his underlings in the office... and yet acting in such an unprofessional manor on this site and even on his own.

    Given his dress code... one wonders if such a policy could be upheld in court if one of his female staffers were to go to court claiming sexual harassment for the artificially imposed limit on what she can wear to work. It’s one thing to say that a person must dress in a professional manor, but it’s quite another to declare what that is down in a way that could seem to be sexually gratifying for the policy maker (ie “mmm, legs”).

    By the way, Don? Regarding your 1st point...Where I come from, ‘unprofressional’ is spelled ‘unprofessional’ and ‘dont’ is properly spelled ‘don’t’.

    I hope this clears up some confusion.
    Brendan

  • DrPizza (unregistered)

    "Dirty, unprofressional hippies go nowhere in life. "

    Yeah, who wants to be like that fucking Bill Gates loser.

  • Anonymous (unregistered) in reply to Donald K. Burleson

    I hope this clears up some confusion. Don

    Yep, now I -know- you're an idiot :-)

  • trwtf (unregistered)

    "If you have been working all-night and have an early morning meeting, you can use an anti-inflammatory hemorrhoid cream (e.g. Preparation H) to quickly shrink those unsightly puffy bags under your eyes."

  • Me (unregistered)

    Alex,you may want to remove the spam comments.

Leave a comment on “Random Randomization”

Log In or post as a guest

Replying to comment #:

« Return to Article