This project uses the stock [https://jdbc.postgresql.org/ Postgres JDBC], version 42.1.1
# === Create an empty database: <code>$ createdb --usernameon RDP ===postgres patents_june_2017 # password is tabspaceenter</code># Create tables via script at <code>E:\McNair\Projects\SimplerPatentData\src\db\NaiveSchema.sql</code>#* Prior Example <code>E:\McNair\Software\Scripts\Patent\createTables.sql</code>#* Aim to create a completely naive schema with as few constraints as possible--iteratively add more constraints in the future
To create an empty database, run this command: <code>$ createdb --username=postgres database-name-goes-here # password is tabspaceenter</code> === Abstraction Layer === Since writing raw SQL is a bit cumbersome and error-prone, I have added some abstraction layers that make it much easier to quickly add bulk data. By using Postgres's <code>CopyManager</code> class, we buffer SQL copy commands in memory (as many as possible) and then flush these rows. To understand how the abstraction layers work, see the code in <code>E:\McNair\Projects\SimplerPatentData\src\main\java\org\bakerinstitute\mcnair\postgres</code>. For a concrete example, see <code>E:\McNair\Projects\SimplerPatentData\src\main\java\org\bakerinstitute\mcnair\uspto_assignments\GeonamesZips.java</code> for a '''simple, self-contained example''' or See <code>E:\McNair\Projects\SimplerPatentData\src\main\java\org\bakerinstitute\mcnair\models\GrantedPatent.java</code> for '''an example of how to extend''' the abstraction layer to deal with more complex scenarios.
== Address Data ==