Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^4: Increase a value inside MySQL query using perl

by chacham (Prior)
on Oct 14, 2015 at 20:51 UTC ( [id://1144912]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Increase a value inside MySQL query using perl
in thread Increase a value inside MySQL query using perl

I'm just making a technical note here. You are referring to the SQL paradigm, as opposed to a database concept. Instead of mentioning the rdbms and then putting words in quotes, don't mention the rdbms at all. :)

I will disagree with you partially, about the rdbms not having those concepts. Row order is important to RDBMS's. For example, Oracle has ROWID which is the actual location of the record itself. (And row pointers if they move!) SQL Server organizes table data based on an index (as does Oracle in IOTs.) Other RDBMS likely have similar concepts. So, there is such a concept in the DB, and a program can make use of it too. It's only SQL that doesn't have the concept.

  • Comment on Re^4: Increase a value inside MySQL query using perl

Replies are listed 'Best First'.
Re^5: Increase a value inside MySQL query using perl
by CountZero (Bishop) on Oct 15, 2015 at 18:46 UTC
    Does a DB wih ROWIDs serve the records in ROWID-sequence?

    Row order should not be important at all, and a DB where this is important is somehow doing it all wrong.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    My blog: Imperial Deltronics

      Does a DB wih ROWIDs serve the records in ROWID-sequence?

      That is a SQL question, not a database question. Databases store data, and order can be very important. SQL is used to retrieve data (via the SQL engine in the RDBMS), and displays it in no specific order, unless told do so.

      But anyway, does ROWID affect retrieval? IIUC, it most certainly does. The table (assuming an index is not used in the query) points to the first data block, which most likely contains the first record, and chains from there. A database that did otherwise would likely be inefficient.

        A database that did otherwise would likely be inefficient.
        And there lies the root of all database evil. Such a close connection between the data and the storage goes against all principles of SQL. And the way SQL is implemented is already a weakened form of what it should have been.

        CountZero

        A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

        My blog: Imperial Deltronics

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1144912]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-24 22:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found