Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to stage data
    primarykey
    data
    text
    <p>A team I'm working with is tasked with comparing two similar database tables--they contain the same number of rows and the same number of columns, but slightly different data--so I'm writing a Java program to facilitate that process. There will be someone going through both tables row-by-row, column-by-column, comparing the data from TableA to TableB.</p> <p>Now, TableA and TableB both exist in a large, slow, and ever-changing corporate databases, so I want to be able to stage them in order to 1) make my program faster and 2) make it so that the QC results aren't invalidated when the underlying data changes. </p> <p>However, I'm not exactly sure how I want to stage my data. It seems as though creating two new tables within my database for the QC process would be inefficient. Database normalization techniques seem to suggest I should made a "Attribute" table, containing each individual field: Attribute_id, value, row_id (foreign key pointing to row in both TableA and TableB), attribute_type_id (foreign key pointing to a table containing lists of attribute_names). </p> <p>This would allow me to do neat things like have QC "versions"--one person might say "TableA's value is correct," but then someone could go back later and say "no, tableB's is right" and I could easily store and retrieve that history. It doesn't seem correct, though, to collapse two tables down to what amounts to a big, long list like that. Also, I'm not sure how fast my staging database is so I might not want to do a lot of joins. (I know, it's silly, but our databases are slow.)</p> <p>Or, alternatively, I could simply have the two tables mirror each other, and simply go row-by-row, column by column. This would be easy and wouldn't require many database queries, but it seems less efficient and would make expanding my functionality a little more difficult.</p> <p>What do you think, kind reader?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload