Database design
 
            
                
                    Jamal                
                
                    Posts: 2,115                
            
                        
            
                    I'm creating a database in SQL (MySQL) for a rado station's website and I kind of got myself stuck in the design phase ... 
I am struggling wether I ought to make 2 tables (programs and daysoftheweek) or if it would be better with 3 tables (one extra to link the programs to the days)....
I hope it's clear enough 
                
                
I am struggling wether I ought to make 2 tables (programs and daysoftheweek) or if it would be better with 3 tables (one extra to link the programs to the days)....
I hope it's clear enough
 
                Surf little waves big... Charge big waves hard
- Antwerp '06, Nijmegen '07, Werchter '07
- Antwerp '06, Nijmegen '07, Werchter '07
Post edited by Unknown User on 
0
            Comments
- 
            My suggestion is to make it as diverse as you can.
 The company I work for started off by spending 10 years just building the database and filling it with as much information as possible. Now we are the largest in the industry. The manufacturers use us because we have the most flexible and diversified database.I necessarily have the passion for writing this, and you have the passion for condemning me; both of us are equally fools, equally the toys of destiny. Your nature is to do harm, mine is to love truth, and to make it public in spite of you. - Voltaire0
- 
            
 yeah, diversity is key...Ahnimus wrote:My suggestion is to make it as diverse as you can.
 The company I work for started off by spending 10 years just building the database and filling it with as much information as possible. Now we are the largest in the industry. The manufacturers use us because we have the most flexible and diversified database.
 but it's a short-term project that will not be expanded in the future. Therefore I just want it to be light-weight and efficient, yet versatile.Surf little waves big... Charge big waves hard
 - Antwerp '06, Nijmegen '07, Werchter '070
- 
            Jamal wrote:yeah, diversity is key...
 but it's a short-term project that will not be expanded in the future. Therefore I just want it to be light-weight and efficient, yet versatile.
 Well, I'm not a huge DB expert, but I don't think one extra table will cause serious latency issues. I always have problems figuring that stuff out myself.I necessarily have the passion for writing this, and you have the passion for condemning me; both of us are equally fools, equally the toys of destiny. Your nature is to do harm, mine is to love truth, and to make it public in spite of you. - Voltaire0
- 
            
 I think I'll take the extra table thenAhnimus wrote:Well, I'm not a huge DB expert, but I don't think one extra table will cause serious latency issues. I always have problems figuring that stuff out myself.
 I don't expect too many entries anyways, so ...
 thanks Surf little waves big... Charge big waves hard Surf little waves big... Charge big waves hard
 - Antwerp '06, Nijmegen '07, Werchter '070
- 
            *edit*
 this is what I came up with# fotofactory DATABASE # Jimmy Symoens 2 ICT 1 # 2006-2007 create database radio; use radio; # tabel staffs aanmaken create table staff ( staff_id int(10) NOT NULL auto_increment, login varchar(20) NOT NULL default '', pw varchar(20) NOT NULL default '', naam varchar(50) NOT NULL, job varchar(255), email varchar(255) NOT NULL default '', photo_url varchar(255), primary key(staff_id) ) engine='innodb'; # tabel shows aanmaken create table shows ( show_id int(10) NOT NULL auto_increment, name varchar(20) NOT NULL default '', show_email varchar(255) NOT NULL default '', descr mediumtext, primary key(show_id) ) engine='innodb'; # tabel episodes aanmaken create table episodes ( episode_id int(10) NOT NULL auto_increment, show_id int(10) NOT NULL, staff_id int(10), foreign key(show_id) references shows(show_id), foreign key(staff_id) references staff(staff_id), primary key(episode_id) ) engine='innodb'; # tabel program aanmaken create table program ( day ENUM ('monday','tuesday','wednesday','thursday','friday','saturday','sunday'), begin varchar(5), end varchar(5), episode_id int(10), foreign key(episode_id) references episodes(episode_id), primary key(day, begin) ) engine='innodb';Surf little waves big... Charge big waves hard
 - Antwerp '06, Nijmegen '07, Werchter '070
- 
            Anyone really good in php? Surf little waves big... Charge big waves hard Surf little waves big... Charge big waves hard
 - Antwerp '06, Nijmegen '07, Werchter '070
- 
            Im not really good at it but i know some...what you trying to know?0
- 
            
 How I can use a class to make the conversation with my database object-orientedturnedmyworldtoblack wrote:Im not really good at it but i know some...what you trying to know? 
 *edit*
 and a class for making xml podcasts automatically... Surf little waves big... Charge big waves hard Surf little waves big... Charge big waves hard
 - Antwerp '06, Nijmegen '07, Werchter '070
Categories
- All Categories
- 149K Pearl Jam's Music and Activism
- 110.1K The Porch
- 278 Vitalogy
- 35.1K Given To Fly (live)
- 3.5K Words and Music...Communication
- 39.2K Flea Market
- 39.2K Lost Dogs
- 58.7K Not Pearl Jam's Music
- 10.6K Musicians and Gearheads
- 29.1K Other Music
- 17.8K Poetry, Prose, Music & Art
- 1.1K The Art Wall
- 56.8K Non-Pearl Jam Discussion
- 22.2K A Moving Train
- 31.7K All Encompassing Trip
- 2.9K Technical Stuff and Help

