data-integrity

drop down list validation

I'm working on a web app project (in java; not that it matters) and we have a form with drop down lists and input fields,etc.. Obviously drop down lists are provided because we expect a specific value from a set of values. So my question is this..does it make sense to ensure the submitted value is in the set of expected values? ...

How do you add Foreign Key Relationships?

I'm working with an existing SQL 2005 database that was not implemented with FK relationships between tables. I tried to add the relationships with a database diagram and my application immediately blew up trying to edit or insert any data that is tied to the new FK. dbo.person [person_id | firstname | lastname | dateofbirth] dbo.campa...

How do I guarantee data is the same after upgrading SQL Server?

I have to upgrade a database from SQL Server 7 and SQL Server 2000 to SQL Server 2008. Additionally I have to be able to prove in a court of law that the data pre-migration is exactly the same post-migration. Any ideas? ...

tools for downloading software + automatically verifying integrity

(moved here from a combined question) I'm wondering if there are any software tools projects to: create a standard machine-readable format for publishing a small metadata set = (download link + MD5 hash + optional public key and/or certificate) plus a browser plugin (preferably Firefox) to automatically read that data and assist in th...

Testing for concurrency and/or transactional integrity in a web application with JMeter

I'm rather new to working with multiple threads in a database (most of my career has been spent on the frontend). Today I tried testing out a simple php app I wrote to store values in a mysql db using ISAM tables emulating transactions using Table Locking. I just wrote a blog post on the procedure Here: Testing With JMeter From my...

database design for tradition AND ini-file-like data with integrity

I would like some viewpoints on the best way to handle situations where you have normal (traditional) database data and at the same time also have data that is more like "ini file" data and you want to maintain integrity between them (heirachical data?). For example, suppose I have a "CURRENCY" table with 100 rows. At the same time I ha...

Error handling and data integrity when changing table schema

We have a few customers with large data sets and during our upgrade procedure we need to modify the schema of various tables (adding some columns, renaming others, occasionally changing data types, but that's rare). Previously we've been going via a temporary table with the new schema, and then dropping the original and renaming the tem...

Checking rule violations before deleting a record

I would like to implement a "soft-delete" scheme for a number of entities in my SQL Server 2005 database. By this, I mean I would like to delete an row from a table if there are no referential integrity rule violations, otherwise I will set a flag on the record to signify it has been deleted. The table I wish to enforce this "soft-delete...

Python: encryption as means to prevent data tampering

Many of my company's clients use our data acquisition software in a research basis. Due to the nature of research in general, some of the clients ask that data is encrypted to prevent tampering -- there could be serious ramifications if their data was shown to be falsified. Some of our binary software encrypts output files with a passw...

Preserving data integrity in Drupal:

I've happened to develop a module in Drupal and due to some seeming View limitations had to use custom SQL. This ran me into some problems with node revisions and I came to conclusion that in Drupal it's best to use its native methods for working with any data. Otherwise, data integrity problems may arise. And even with desire to optim...

What would be the SQL Select statement for mixed dates in one column?

I have a customer who has legacy data stored in Oracle database. Such data contains mixed DATE values in one column in database (that field is VARCHAR(32)). For example they store '30-Sep-2009' and sometime '1254431689' (that is a timestamp in epoch time). I have no option to split the data into multiple columns (so I have to deal with...

How atomic is the Berkeley DB usage?

I am writing a simple app with 24 items in a hash to be persistent across program executions, so Berkeley DB (DBM) should be well suited for this task. And it is just for fun. But I wonder if using it (with Ruby), then when the user presses CTRL-C, then the execution is stopped. In this case, can't the data be all messed up? For exa...

C++ Is private really private?

I was trying out the validity of private access specifier in C++. Here goes: Interface: // class_A.h class A { public: void printX(); private: void actualPrintX(); int x; }; Implementation: // class_A.cpp void A::printX() { actualPrintX(); } void A::actualPrintX() { std::cout << x: } I built this in to a stat...

SQL Server: How to ignore referential integrity until COMMIT?

i have a process to move rows from one database to another. Because of some circular foreign key reference chains i cannot remove the rows from the old database, nor can i insert them into the new database. Since the entire operation happens in a transaction1, i want SQL Server to ignore referential integrity failures until i call COMMI...

Normalization of database for timesheet tool and ensure data integrity

I'm creating a timesheet application. I have the following entities (amongst others): Company Employee = an employee associated with a company Client = a client associated with a company So far I have the following (abbreviated) database setup: Company - id - name Employee - id - companyId (FK to Company.id) - name Clie...

Should I remove banned contents on my database?

Hi, I'm in front of decision on how to do with flagged data by the users. The banned data could be an image, a wiki, an user and something else need to be managed like a message board. I'd like to work with user stats in many cases, to find users with bad behaviour, users with many activity, users with best photos and so on with all I c...

Efficient data importing?

We work with a lot of real estate, and while rearchitecting how the data is imported, I came across an interesting issue. Firstly, the way our system works (loosely speaking) is we run a Coldfusion process once a day that retrieves data provided from an IDX vendor via FTP. They push the data to us. Whatever they send us is what we get. ...

How to prevent column b containing the same value as any column a in Oracle?

What is a good way to prevent a table with 2 columns, a (unique) and b, from having any record where column b is equal to any value in column a? This would be used for a table of corrections like this, MR -> Mr Prf. -> Prof. MRs -> Mrs I can see how it could be done with a trigger and a subquery assuming no concurrent activity but ...

How to organize live data integrity tests and code unit tests?

I have several files with code testing code (which uses a "unittest" class). Later I found it would be nice to test database integrity also. I put this into a separate directory tree. (Things like the keys have correct format, parent and child nodes are pointing correctly and such. Edit: this is a nosql project, where I can not rely on ...

MS Access 2003: Can data disappear from records and how do I test for this and prevent it?

Problem and about the database: Data from a record in Access 2003 database has disappeared. This database has 1 backend and 3 frontends, multiple users and is hosted on Citrix. Within this database, we have records of all clients served, ranging in the 1000s. Background info: The form for client data entry is set up with various subfor...