Meeting to Touch Base on the Project
At Cristina’s suggestion, I used Doodle to try to schedule a meeting with everyone.
She also suggested everyone could Skype rather than meeting in person. Given everyone’s conflicting schedules, and that Prof. Pattuelli will be at the ARLIS Conference in New Orleans at the beginning of February, this may be a good solution.
Data Cleaning and Normalization
My laptop, on which I’ve been querying Python, and on which I have the OpenRefine desktop client installed, is unfortunately being repaired today, but I’m planning to do some work on tabular data today.
I’m not sure if my user privileges on the Whitney’s computers will enable me to install OpenRefine on my desktop computer here, but if nothing else I can work in Google Sheets.
Unfortunately, it is looking like my work is going to be limited to Google Sheets today.
Object/Constituent Relations in Joshua’s Database
Initially, I was a little confused how the two tables (Objects and Constituents) in Joshua’s MySQL database were related to each other, as their SQL doesn’t indicate any foreign keys. Constituent ID seems like it would be a natural foreign key in the Object table, for example.
As it turns out, Joshua used a PHP script to create a join:
<?php
$query = “SELECT objects.*, people.constituentID FROM `objects` JOIN people ON people.displayName = objects.Artist WHERE `objectID` =”.$objectID;
$result = $conn->query($query);
if (!$result) {
die($conn->error);
} else {
$row = $result->fetch_assoc();
};
// print_r($row);
$name = $row[‘Title Sort’];
$creator = $row[‘Artist’];
$artform = $row[‘artform’];
$artMedium = $row[‘artMedium’];
$artworkSurface = $row[‘artworkSurface’];
$spatial = $row[‘Dimensions’];
$dateCreated = $row[‘Date’];
$accrualMethod = $row[‘Credit Line’];
$constituentID = $row[‘constituentID’];
?>
I’m not really familiar with PHP, so I don’t understand the rationale of doing this join with PHP versus making the tables relational with primary/foreign keys in SQL.
More on generating JSON from a MySQL database using PHP:
http://www.kodingmadesimple.com/2015/01/convert-mysql-to-json-using-php.html
Indexing a Generated Column to Provide a JSON Column Index:
Summary Overview of using MySQL or PostgreSQL as a triple store:
http://rdfextras.readthedocs.io/en/latest/store/mysqlpg.html
One random note – I somehow didn’t realize that PURL stands for Persistent uniform resource locator