Hi,
I'm quite new to php and not the greatest of coders, so urgently require your help.
I want to be able to take data from an un-normalised table and load into 2 normalised tables as below:
1) Table 1 - All Music Tracks (Un-normalised table)
Album Name
Artist Name
Track Name
Track Length
etc.
2) Table 2 - Albums Table (Normalised table)
ID
Artist Name
Album Name
etc.
3) Table 3 - Tracks Table (Normalised table)
ID
Track Name
Album ID (foreign key to Albums table)
etc.
Can someone please provide some sample code as a starting point?
The All Music Tracks table includes both the album name and track name in each row, but I only want the album appearing once in the Albums tables, so I need a way of getting all album names, then inserting into the Album table, then inserting the tracks into the Tracks table at the sametime.
I will have approx. 2000 records to process, so should I take this into consideration as part of the code, or is 2000 recs considered small?
Much Appreciated,
PD