Welcome Guest, Not a member yet? Register   Sign In
Compound Query
#6

[eluser]jedd[/eluser]
[quote author="bhbutter123" date="1260064180"]I forgot to mention that there is also a path field that has a link to the file, would I need another table for that or can I put it in one the files table? I am not familiar with the way the three table system works or with join. If you could give me some insight that would be appreciated.[/quote]

As mentioned, you need to learn about normalisation.

This comes down to mapping entities (things) and relationships (relationships) between them.

Anything that has a 1:1 relationship - such as the path of a file - should, generally, live next to the file.

Anything that has a 1:n relationship - such as a file's categories - needs to be expanded out to separate tables with a joining table to connect them.

Having said that, file paths (and indeed names) should probably be determined by the application at the time the files arrive - you can then algorithmically determine the file's name. UUID's are ideal - consistent size, virtually guaranteed to be unique, safe across pretty much every file system out there, etc.


Messages In This Thread
Compound Query - by El Forum - 12-05-2009, 04:22 AM
Compound Query - by El Forum - 12-05-2009, 05:50 AM
Compound Query - by El Forum - 12-05-2009, 09:53 AM
Compound Query - by El Forum - 12-05-2009, 01:49 PM
Compound Query - by El Forum - 12-05-2009, 03:20 PM
Compound Query - by El Forum - 12-05-2009, 06:57 PM



Theme © iAndrew 2016 - Forum software by © MyBB