Forum Home
Press F1
 
Thread ID: 139582 2015-05-26 21:20:00 Databases gary67 (56) Press F1
Post ID Timestamp Content User
1401398 2015-05-26 21:20:00 I'm thinking of building a database of all of my music as an exercise to help me learn them so that I can cross reference songs on various albums.

I do have access 2007 but would I be better to learn how to use SQL and if so can anyone point me to an idiots guide?

Thanks
gary67 (56)
1401399 2015-05-26 21:33:00 I'm thinking of building a database of all of my music as an exercise to help me learn them so that I can cross reference songs on various albums.

I do have access 2007 but would I be better to learn how to use SQL and if so can anyone point me to an idiots guide?

Thanks
Code school, udemy and Lynda.com all have beginners courses on database building and web site design. For MySQL you will need to download and install wamp first
To allow you to install your own server and run php.
Webdevguy (17166)
1401400 2015-05-26 22:10:00 I have my own amahi server I could install to gary67 (56)
1401401 2015-05-26 23:09:00 Or SQLLite - similar principal to MS Access - a file based db.

Just make it configurable - that adds to the experience, so later on you can switch databases from file based to server based if you so desire
psycik (12851)
1401402 2015-05-27 00:52:00 For something like that I'd think access would do the job fairly nicely. Nick G (16709)
1401403 2015-05-27 01:04:00 I have my own amahi server I could install to

Instructions here (www.amahi.org)
Webdevguy (17166)
1401404 2015-05-27 08:37:00 Access has a query builder that will allow you to see the query structure visually, and will also allow you to view the exact same query as SQL, which I think will make getting to grips with SQL easier.

I've used Access for years, and frankly never had to use SQL, but I've picked up the basics just from switching to SQL view. Select FROM WHERE etc.

Unless your music collection runs to over 200,000 tracks you'll probably find Access perfectly satisfactory for the task.
Paul.Cov (425)
1401405 2015-05-27 22:05:00 Decided to use access since I have it.

First dumb question.

I think I need 3 tables Artist, Album,Song
Under each table I think I need

Artist ID
Artist name

Album ID
Album name
Artist name
Song

Song ID
Song name
Album name
Artist Name

Is this correct

every tutorial I can find tells you how to make a table but not what fields are required for multiple tables
gary67 (56)
1401406 2015-05-27 23:21:00 Decided to use access since I have it .

First dumb question .

I think I need 3 tables Artist, Album,Song
Under each table I think I need

Artist ID
Artist name

Album ID
Album name
Artist name
Song

Song ID
Song name
Album name
Artist Name

Is this correct

every tutorial I can find tells you how to make a table but not what fields are required for multiple tables

It sounds like you are wanting to build an associative database .

Basic explanation here
. w3schools . com/php/php_arrays . asp" target="_blank">www . w3schools . com
PHP Associative Arrays
Associative arrays are arrays that use named keys that you assign to them .

There are two ways to create an associative array:

$age = array("Peter"=>"35", "Ben"=>"37", "Joe"=>"43");
or:

$age['Peter'] = "35";
$age['Ben'] = "37";
$age['Joe'] = "43";
The named keys can then be used in a script:

Example

<?php
$age = array("Peter"=>"35", "Ben"=>"37", "Joe"=>"43");
echo "Peter is " . $age['Peter'] . " years old . ";
?>

Run example »
Loop Through an Associative Array
To loop through and print all the values of an associative array, you could use a foreach loop, like this:

Example

<?php
$age = array("Peter"=>"35", "Ben"=>"37", "Joe"=>"43");

foreach($age as $x => $x_value) {
echo "Key=" . $x . ", Value=" . $x_value;
echo "<br>";
}
?>

The way I look at it is that an Artist can produce many CDs and each CD can have many songs on it . where as a Song is generally only written by one Artist .

Youtube tutorial here . youtube . com/watch?v=aNmUwdt9-r4" target="_blank">www . youtube . com
Webdevguy (17166)
1401407 2015-05-27 23:41:00 Yes I guess so as each artist can have many albums but also some songs appear on many albums. gary67 (56)
1 2