PostgreSQL is a very powerful database. One of the things that seems missing when moving from MySQL is the ability to simply create an enumeration. ENUM is nice when you have a programmatically-semantic set of values for a field.
In PostgreSQL, you have several choices. But one simple one is to create a Check expression, like follows. Skip the IS NULL part if you don’t want the field nullable.
"TransferStatus" IS NULL
"TransferStatus" = ANY(ARRAY['TransferComplete', 'TransferFailedNoAnswer', 'TransferFailedProspectLost'])
2010-2011 was the first year that we were required by PA law to report our schooling activities to the Altoona Area School district. (simply because our oldest turned 8)
Naturally, the topic of Log and portfolio came up needing solved.
Having been home educated as a child, I recall the massive effort it took to remain organized enough to be able to assemble a really good portfolio at the end of the year. Also, the log book needed to be throughly kept to provide record of education activities.
Here is a brief list of items that need improved:
- Portfolios typically are assembled at the end of the year, which requires a lot of effort.
- There is only one copy of a portfolio.
- They are a bit kludgy, having a mix of all sorts of media (photos, papers, art, etc…)
- They are not searchable
- They are not sortable
- They are not printable
- They are not email-able
- They are not backup-able
- They typically show only the “best” work, by virtue of what they are (depends on the assembler)
- They are separate from the log of the actual activities
Well, after a lot of here and there, I decided we needed a database. So my wife and I designed a database that would handle a number of aspects:
- Multiple Students
- Subjects as required by law
- Projects that are a part of schooling
- Activities and Events
- Scanned documents
- PDF files
The ultimate goal is to be able to send off for a printed book with the above content, and turn that into the school district.
I thought that a web interface would be appropriate. So here is where I am at after a couple days of tinkering around…
If anyone expresses interest in seeing more of this, post a comment.
Great howto on grabbing a selection of random records from a few different databases here: