Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Developing music website - some questions

  • 08-07-2012 1:46pm
    #1
    Closed Accounts Posts: 28


    I'm looking to create a website that will showcase albums that have been released during the year. At the moment I have the album details stored in an XML file and retrieving it with AJAX, is this a good method to use or would using a Database be better?


Comments

  • Closed Accounts Posts: 1,487 ✭✭✭Pov06


    Using a database would be better.


  • Closed Accounts Posts: 28 bleeding_souls


    hmm, yeah i was thinking that would be a better way to go since the XML can be a little fiddly.

    I know i will have fixed column information such as artist name, album name, etc. but what could i do for variable information like the track names, each album would have a different amount of songs


  • Registered Users, Registered Users 2 Posts: 6,465 ✭✭✭MOH


    You've a table for Artist, one for Album, and one for Track.


  • Registered Users, Registered Users 2 Posts: 1,082 ✭✭✭Feathers


    If there isn't a reason that you particularly want to handle this info yourself (doing it to learn, have a specific list you want to show), you could check out Gracenote too, they have a developer API & 130 million tracks.


  • Closed Accounts Posts: 28 bleeding_souls


    Feathers wrote: »
    If there isn't a reason that you particularly want to handle this info yourself (doing it to learn, have a specific list you want to show), you could check out Gracenote too, they have a developer API & 130 million tracks.

    Thanks for that i might try using that in the future. At the moment though I'm trying to develop this as a personal project so i'm trying to handle the information myself. :D i was thinking to have a table for the albums and have separate tables for each albums details but could that make up too many tables?


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 1,082 ✭✭✭Feathers


    I was thinking to have a table for the albums and have separate tables for each albums details but could that make up too many tables?

    There are as many ways to divide up data as there are developers, & as a learning exercise you'll probably find yourself refactoring a lot to trial stuff, but I'd recommend keeping it as simple as possible to start with — split stuff out to its out table when it starts to become unwieldy, but not too early.

    I'd probably go with MOH's suggestion of a table for track, album, artist — purely because there is a logical separation of the metadata between the three categories: e.g. the whole album is likely to have the same sound engineer and producer, but different tracks may have different session musicians and will definitely have different lengths.

    If you were to do your method above, what would be in the Albums table as opposed to the album-details table?


  • Closed Accounts Posts: 28 bleeding_souls


    well i was just going to have the general details of the album, artist, release, etc. and in an album-details table have the tracks and their details.

    after reading your comment, perhaps that is a better way of going about this. in the album table would you have your track_ids as a secondary key to the track table then perhaps?

    btw, i really appreciate the help :D


  • Registered Users, Registered Users 2 Posts: 1,082 ✭✭✭Feathers


    after reading your comment, perhaps that is a better way of going about this. in the album table would you have your track_ids as a secondary key to the track table then perhaps?

    btw, i really appreciate the help :D

    NP! I'd probably go for having the foreign_key defined on the track table — since your track can only have one album (presumably?), whereas your album is going to have multiple tracks. If the same track can appear on multiple albums though (compilations, best of) you may want an additional table for many-to-many style relationships.


  • Closed Accounts Posts: 28 bleeding_souls


    that makes a bit more sense having it that way around instead :p


Advertisement