Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re^4: database and deployment questions

by SpaceCowboy (Acolyte)
on Oct 21, 2021 at 19:23 UTC ( #11137858=note: print w/replies, xml ) Need Help??

in reply to Re^3: database and deployment questions
in thread Newbie question

can you please elaborate, I'd like to learn from you
  • Comment on Re^4: database and deployment questions

Replies are listed 'Best First'.
Re^5: database and deployment questions
by Bod (Curate) on Oct 21, 2021 at 20:35 UTC
    can you please elaborate

    Note that I am very much self-taught so may use incorrect terms and make assumptions - others will hopefully correct any errors I make.

    A Temporary Table is much like a regular table in the RDBMS except that it created on the fly by your code. It is automatically dropped by the RDBMS when the database session ends. So it only exists within the current running instance of your code.

    So a common use for a Temporary Table is to gather together data from various different sources (usually other tables) so that SQL operations can be performed on all the data at once. For example, in my CRM I have a reminder view. This takes birthdays from the 'Person' table, reminders from the 'Note' table, anniversaries from the 'Anniversary' table, etc. It loads all this into a Temporary Table before sorting in into date order and showing just the first 20 events.

    This code snippet is ancient legacy code and I wouldn't write it quite like this now but it should give you the idea of pulling data from different places and then working on the combined result.

    In this example, all the data sources are within the same database schema. But they could be in different schemas within the same RDBMS or different RDBMS's. They could be on different machines in different locations potentially accessed over ODBC. They don't even have to be data sources from databases - they could come from anywhere.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (1)
As of 2022-05-22 06:50 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (79 votes). Check out past polls.