title: How do you rebild a relational database from .csv files?
body: <p>So I've got a little over 1.5TB of data, which I have been told came from sort sort of relational database. Unfortunately, somewhere along the line, everything that makes a relational database relational was stripped out and what we're left with is almost fifty .csv files, each one corresponding to one of the tables in the database. There's no schema, no notes, and only one piece of helpful documentation. Compounding the problem is that we don't have access to the people who maintain the database and can't go and ask them what X_ATTRIB_14 in CX_CUST_O means.</p>
  
  <p>We DO have a file that lists, for each attribute, name and datatype, and this covers all tables, so we at least know what the attributes are. It looks something like</p>
  
  <p>TABLE_NAME</p>
  
  <p>ROW_ID.....................VARCHAR2(32)</p>
  
  <p>CREATED....................VARCHAR2(16)</p>
  
  <p>LAST_MODIFIED.........DATE</p>
  
  <p>etc etc etc</p>
  
  <p>The data is very patchy, with many attributes without data listed in any of the fields, and lots of unhelpful names like ATTRIB_3. Each table does have a ROW_ID, CREATED, and CREATED_BY, as well as a CONFLICT_ID. Then, there are the data fields, which are usually patchy and only partially filled as well, with lots of empty values.</p>
  
  <p>So far I've done some basic pre-processing by eliminating attributes which have no values and checking to see if there are simple naming conventions that would give us a hint - for example, if X_ATTRIB_3 in TABLE_A is the same as X_ATTRIB_3 in TABLE_B, and it appears that the only common attributes are those that are trivial - LONGITUDE, for example, is common across a few tables, but that is unlikely to help. I'm unsure as how to proceed; the sheer size of the data makes it impossible to look at everything by hand.</p>
  
  <p>Are there any tools or techniques that have been developed that would aid in reconstructing the relationships between the tables, or is this sufficiently rare that we're going to have to start from scratch?</p>
  
  <p>Thank you for your time.</p>