Topic awaiting preservation: sql Problem (Page 1 of 1) |
|
---|---|
Paranoid (IV) Inmate From: INFRONT OF MY PC |
posted 10-14-2008 18:20
I have following Tables in my DB: |
Maniac (V) Mad Scientist From: Denver, CO, USA |
posted 10-14-2008 20:01
man, that's a scary freaking db scheme; meta content has no business in a database. Why not include that information directly in the DVD table? Though I'm having trouble figuring out who an 'author' of a DVD is. Gimme a couple rows from each table and I might be able to construct a SQL statement for it... |
Paranoid (IV) Inmate From: INFRONT OF MY PC |
posted 10-14-2008 20:08
thanks for the help but i already found out how. to be honest it is a scary db scheme. Why it is in the db ..hmm fast search and in a separate table so that i do not have to search all the text in the dvd table ..e.g searching for all dvds directed by "blabla" |
Lunatic (VI) Inmate From: under the bed |
posted 10-14-2008 21:29
This kind of thing would normally be done with relational tables. |
Paranoid (IV) Inmate From: INFRONT OF MY PC |
posted 10-14-2008 23:43
yes but this way i get to have as many "meta" information as i want e.g actors, genres, themes, story, locations, ...to have this flexebility would need A LOT of tables |
Lunatic (VI) Inmate From: under the bed |
posted 10-15-2008 00:17
A lot of tables, with a logical schema, and a meaningful structure, is still preferable to one big vague table holding everything... |
Paranoid (IV) Inmate From: Madison, Indiana |
posted 10-15-2008 16:49
Your schema is called 'One True Lookup Table' You can find discussions of it on the InterNET by searching for that phrase and OTLT. Every person who is new to designing databases 'invents' it at some point. When I was trying to use my OTLTs, I found a lot of discussions and a couple of good articles discussing why it's a bad idea. Here's one of them. You might also look for discussions about OTLT at dBforums. |
Maniac (V) Mad Scientist From: Denver, CO, USA |
posted 10-15-2008 17:20
I recall working on a database that had a giant `meta` table that had two columns: `id` and `data`. The `data` column had PIPE-DELIMITED meta data, stored in TEXT datatype. Seriously. I had ulcers. Ulcers! |
Paranoid (IV) Inmate From: INFRONT OF MY PC |
posted 10-15-2008 20:34
Ok i do respect all of you so i will reconsider my db scheme. |