What is a staging table, and how is the staging concept used in Oracle?

What is a staging table, and how is the staging concept used in Oracle?

What is the staging concept and why is it used? Also, what is a staging table?

    Requires Free Membership to View

    By submitting your registration information to SearchOracle.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchOracle.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

In its simplest form, "staging" involves putting something in a specific location to be accessed at a later time. All like items will be staged in the same location. For databases, the most common staging location would be a database table. Maybe an example can help illustrate why we would use staging.

Let's assume we are working on a website to obtain orders from our customers. Our customer shops for items on our website and then places their order. At the end of the order, we confirm their credit charges and then display webpage indicating the successful status of their order. The next thing that normally happens is that we email the customer a copy of their order. But waiting for an email server can cause an unacceptable delay in displaying the order confirmation. So we stage the email confirmation in the table. Instead of actually sending an email to the user during their order process, all we do is INSERT one row containing the order_id into the email staging table. If we have many simultaneous users, the email staging table can contain many rows, one for each order. Every five minutes, a scheduled job looks in the staging table to see if it needs to send out order confirmation emails. If the table contains data, it formulates the email and sends it out. The job then removes the entry from the staging table.

With the staging table, we do not need to perform the action right now. We will get to the action later. So the table contains entries for that action.

This was first published in October 2008

Join the conversationComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.