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 284893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:29:50+00:00 2026-05-12T05:29:50+00:00

How can I ensure the records in a database can not be altered by

  • 0

How can I ensure the records in a database can not be altered by other than the middle tier software (e.g. discourage the DBA of changing values)?

I want to implement a simple multi-tier accounting program using open-source stack. The primary function of the application is to track money paid for one product. The main part of the data model is basically this:

CREATE TABLE ACCOUNT_LOG(
    USER_ID NVARCHAR2(128), /* user identifier of some sort */
    TIMEST  TIMESTAMP,      /* the UTC timestamp of the payment. */
    PREV_AM NUMBER(13,3),   /* the previous money level. */
    DIFF_AM NUMBER(13,3),   /* the the money delta (+/- possible) */
    NEXT_AM NUMBER(13,3),   /* the new money amount. */
    UOM     NVARCHAR(20)    /* the money type (Euro, Dollar, etc.) */
CONSTRAINT pk PRIMARY KEY (USER_ID, TIMEST));

However, this structure is vulnerable to a DBA, as he/she can go in and change amounts for various persons or put in unauthorized money increases.

How can I ensure, that the data in this table can ‘only’ be altered by the middle tier software (e.g. detect alterations of other means)? Note that I’d like to use an open source DB engine, as my program should be as cheap as possible.

I have my own ideas (dirty ways), but I’d like to hear your opinion/best practice. Also, please feel free to ask for further details if necessary.

Thank you for your time.

  • 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. Editorial Team
    Editorial Team
    2026-05-12T05:29:50+00:00Added an answer on May 12, 2026 at 5:29 am

    First: Since you’ll hand out all the code to the customer, there is no way to make it really secure.

    Second: A way with (in my opinion) good balance between effort and effect would be to add an extra column, then when ever you change the values, concatenate all the values, add a secreat password to it (better term would be ‘salt’), run it through a cryptographic hash algorithm and put the result in the extra field. When you read the data, you repeat the whole thing and compare the values. If they don’t match somebody fiddled with the values.

    If detecting changes is not sufficient, you can use an encryption algorithm instead of a hash, thereby enabling recreation of the original data.


    Actually if you have the option to keep the implementation of the concatenation, salting and hashing away from the customer site this could become pretty save. The obvious way to do that to have a little tool for calculating the hash on your site. When the values need changing, the user/admin need to contact you to get the new correct hash value.

    Of course this only works, when the number of changes is not to high and the lengthy time needed for mailing you, and getting the reply is ok.

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

Sidebar

Related Questions

I have a table in my database in which records conceptually can be children
How do you ensure, that you can checkout the code into Eclipse or NetBeans
I have to insert some records in a table in a legacy database and,
When inserting records to a database table which has a 1:m relationship to another
there's this interesting problem i can not solve myself. I will be very glad,
Can somebody point me to a resource that explains how to go about having
Can anyone (maybe an XSL-fan?) help me find any advantages with handling presentation of
Can you cast a List<int> to List<string> somehow? I know I could loop through
can you recommend some good ASP.NET tutorials or a good book? Should I jump
Can a LINQ enabled app run on a machine that only has the .NET

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.