Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 187709
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T15:52:17+00:00 2026-05-11T15:52:17+00:00

I’ve got a table: CA ca_id placement_id blah blah This table gets updated with

  • 0

I’ve got a table:

CA

  • ca_id
  • placement_id
  • blah
  • blah

This table gets updated with new unique placements every hour from data warehouse. Now the end-user wants to track statuses for those placements.

I was thinking of adding a new table which would get updated hourly as well:

CA_Status

  • placement_id
  • record_status
  • last_updated_on

OPTION 1:

Add unique constraint to placement_id. Implement some mechanism (trigger perhaps?) where if the placement exists update the record_status and last_updated_on fields. If not create a new record. I can then join this with the CA table, by placement_id, and get the latest status of each placement.

OPTION 2

I can dump the unique constraint on the placement_id. This will let the table grow with the latest record_status for any placement. When I join I can get MAX(last_updated_on) to get the latest record_status.

OPTION 3:

Dump the CA_Status table all together. Add the new attributes to the CA table and do something like option 1

If OPTION 1 are triggers the way to go?

If OPTION 2 would this make my table un-necessarily large.


update: I guess with Option 1 I don’t really need the CA_Status table. I could possibly incorporate those fields into the CA table and update accordingly.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T15:52:18+00:00Added an answer on May 11, 2026 at 3:52 pm

    Since you have full control over the process, OPTION 3 seems easiest to me.

    record_status and last_updated_on into the CA table, and include these fields in your INSERT statement.

    If your requirement is to change the record_status and last_updated_on every time a change is made to the CA table, then an on UPDATE trigger could be used.

    However, you say you have full control over the business logic layer. So, changing the UPDATE statements to update those fields as well is again, the easiest way.

    Unless, you need to track the hourly change in status over time. Then a separate table is required to hold those changes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 85k
  • Answers 85k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer When this anchor will contain only one function to handle… May 11, 2026 at 5:11 pm
  • Editorial Team
    Editorial Team added an answer If you don't need the designer, you can just switch… May 11, 2026 at 5:11 pm
  • Editorial Team
    Editorial Team added an answer I'm going to ignore the one app per answer request:… May 11, 2026 at 5:11 pm

Related Questions

I've been struggling with this for far too long, and I don't see any
I've got a strange problem with SQL Server 2000, and I just can't think
I've got a table of URLs and I don't want any duplicate URLs. How
I've got a table that is supposed to track days and costs for shipping
I've got a table of hardware and a table of incidents. Each hardware has

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.