The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
1answer
27 views

Understanding how relationship sides works

So, I have this relations on my tables (see image) and I need to understand some things. I'll enumerate what I understand and what I need from yours is to say if I'm right or not and in case I'm not ...
0
votes
1answer
54 views

Data exchange between 2 remote postgresql databases

As per subject I'm looking into a reliable way to synchronize 2 tables that have a same structure between two remote postgresql databases. I was thinking about dblink but an not really sure as in the ...
9
votes
4answers
881 views

eCommerce orders table. Save prices, or use an audit/history table?

Im designing my first eCommerce schema. I've been reading around the subject for a little while, and am a bit confused about the relationship between an order_line_item and a product A product can ...
0
votes
1answer
24 views

Is it safe to use “NOT BLOCKING” option on HSQL backup?

The HSQL documentation has the following to say about the "NOT BLOCKING" option on backups: Hot backup is performed if NOT BLOCKING is specified. In this mode, the database can be used during ...
2
votes
1answer
137 views

PostgreSQL 9.2 tstzrange null/infinity CONSTRAINT CHECK

I'd like to limit a PostgreSQL 9.2 tstzrange to valid dates at both ends. No NULLs nor 'infinity'. Various revisions of this SQL isn't constraining '-/+infinity' input: CREATE TABLE bill ( id ...
0
votes
1answer
124 views

Restoring tab exports to a mysql database with integrity

I have a database with a lot of data for a client that's on a shared web host. Doing a plain mysqldump is causing the job to get killed on the server, so we were looking at backing up the tables ...
3
votes
1answer
306 views

Complex constraint across all data in a table

We have a table to record processing that occurs on a system and we need to ensure that only a single row has an 'in process' status. I want to ensure that the result of this is always either zero or ...
0
votes
1answer
128 views

how I can create check sum to validate no changes at int string pairs on table

Business case is. 1)Users print document on paper 2)users carry printed paper to Boss, Boss sing on paper 3)after that users going to administrator to digitally sign that paper. My task is to help ...
4
votes
1answer
93 views

How can I enforce data integrity in this model with a M:2 relationship?

This model describes a part of my database (somewhat simplified): A "Tumor model" describes an experiment a researcher does on animals. The "Animal line" is a breed of lab animals, e.g. a Black 6 ...
1
vote
1answer
413 views

Is SET INTEGRITY of any use after IMPORT statements, or just after LOAD statements?

I'm getting the feeling, both from documentation and empirically, that you can only put SET INTEGRITY to good use after a LOAD, not after an IMPORT. LOAD is mentioned for SET INTEGRITY, but not ...
1
vote
0answers
102 views

MySQL: Fixing Unique key constraint violation

I have a database with an unique key constraint. When I import this database from a dump created by mysqldump I get '14698-3' for key 'UNQ_CATALOGS EARCH_FULLTEXT_PRODUCT_ID_STORE_ID' But when I ...
2
votes
1answer
219 views

How do I ensure consistent MySQL backups?

How can we ensure MySQL backups are consistent when they are taken as full backups as well as incremental backups using binlogs? According to me, I record the COUNT(*) from random tables after ...
2
votes
1answer
132 views

Reformatting master MySQL server and temporary solution

We have MySQL master and replication servers both running on different machines. We have noticed some system files showing integrity issues in the master machine. Temporarily we would like to make the ...
10
votes
2answers
641 views

Modelling constraints on subset aggregates?

This is a cross-post from Stack Overflow. I figured I might get more interesting thoughts here. I am using PostgreSQL but I figure most of the top-end db's must have some similar capabilities, and ...
8
votes
1answer
268 views

What is the actual lowest possible positive REAL number

MSDN says that the range of REAL numbers is - 3.40E + 38 to -1.18E - 38, 0 and 1.18E - 38 to 3.40E + 38. Apparently the true lower limit is much lower. The following script populates a REAL column ...
2
votes
1answer
625 views

How do you verify that all InnoDB tables are in good shape?

Without using a script, Is there a way to get mysql to check all the tables at once to make sure they're not corrupted?