It’s been two months already – surely I haven’t been so busy that I’ve been too preoccupied to do any new projects?
But anyway, here’s a different project which I just hacked up today. Since I’m doing databases at uni this semester, I decided to make a song database. It’s meant to store all the key signatures, BPMs and time signatures that I would need to know about a song in order to include it in a medley. Currently that info is contained inside an Excel spreadsheet, which is a little inconvenient in terms of searching and sorting.
Setting up the database (I’m on Hostgator) wasn’t too hard, but I had to use the interface of phpMyAdmin since I didn’t know the syntax for MySQL. I’m sure it’s similar to PostgreSQL though, PostgreSQL being the system used by my university. Admittedly I jumped a few steps when setting up – I was too lazy to design the database properly.
After creating the database I tried connecting to it via PHP, and made it generate a table displaying all the songs I had so far in the database. It took a few tries, but the screenshot at the top shows how it turned out. Pretty good. I had to add a few extra things to make the Japanese song names show instead of the previous question marks though – something about UTF-8 character encoding.
Currently, I only have a single table of songs which you can see, although there’s more tables in the database internally. I’m planning on making the songs/artists/origins hyperlinks, so that when you click on them you can get more information. And then I’m adding a search bar so that you can search for songs based on name/artist/origin. If I’m feeling ambitious, I might even make it so that I have my own interface for adding/modifying/deleting songs (phpMyAdmin isn’t great). And if I’m feeling ultra ambitious I might add a feature for creating custom song lists, to help with medley making.
Well, that’s the plan. I don’t know how long that will take though.