Flexibility of open source software: An example
I have been using MyLibrary is manage the content of a thing called the “Catholic Portal“, and because MyLibrary is open source I have greater flexibility in my development. Here’s an example.
The Portal is expected to ingest both EAD and MARC records. As these files are submitted I have been stuffing their entire contents into a MyLibrary::Resource object. After all, I know a lot of metadata about the file(s): name/title, date, creator, etc. As for the contents of the file itself I use the Resource object’s note method.
Unfortunately, and by default, the underlying database note field is defined as text. This means my data values can be no longer than 64K in size. Alas, some of my EAD and MARC records are larger than that.
No problem. Dump the database schema. Change the definition of the text field to mediuimtext (16MB). Reinitialize the database. Begin again. No fuss. No muss. The MyLibrary API continues without a hitch. Alternatively, I could have used an SQL ALTER TABLE command to edit thing inline.
Actually, I used this hack once before, specifically, in my Alex Catalogue of Electronic Texts. There too I wanted to stuff the entirety of an electronic text into a MyLibrary::Resource. In this case I upped the value to longtext (4GB) because, believe it or not, some of those electronic texts were huge!
The fun and power of open source software!
Discussion Area - Leave a Comment
You must be logged in to post a comment.