FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Mr. Stuckle and Mr. Miller - explain normalisation with an example
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Mr. Stuckle and Mr. Miller - explain normalisation with an example [message #185277 is a reply to message #185275] Sun, 16 March 2014 20:54 Go to previous messageGo to previous message
Luuk is currently offline  Luuk
Messages: 329
Registered: September 2010
Karma:
Senior Member
On 16-3-2014 21:22, richard wrote:
> I'll bet you won't.
>
> The table I have now consists of the following columns.
> songid,hits, title, author, license.
> Please explain how this data should be normalised.
> And why.
> Thank you.
>

The column 'author' should be an 'authorId'.

why?
- Because 1 author can write more than 1 song
- An author has properties to, like i.e.:
- birtdate
- date of death (if applicable)
- city of birth
- etc
- etc
Another advantage of this is that, when you found out that you
misspelled the name of this author, you only need to change 1 record to
correct the songs of this author.

Another example of this might be 'license'
If i ask questions like:
When became this license valid?
And 'until when was this a valid license'?
Did the author have more than 1 license?

You might say "this is not applicable to my application"
But, in real life, one should be prepared that this will become
applicable for your application. (Because users only start to think
after they see the portential of your application)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [CM] Interesting look at PHP vs hack
Next Topic: simple link won't show
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 14:56:12 GMT 2024

Total time taken to generate the page: 0.04181 seconds