If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > database design...

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-14-04, 19:02
sid sid is offline
Registered User
 
Join Date: Mar 2004
Posts: 1
database design...

Hello,

I'm trying to design a database structure for the purpose of keeping track of recent programs and their features.

* Each program is organized in a category and section.
* There is a set of pre-determined features that any program may have.

Example of features:

Language Written in:
C/C++
Assembly
Visual Basic
Java

General Features:
Pluggable
Source code
Documentation
Price

Platform:
Windows
Linux
MacOS

etc....

When listing the programs, a tick beside the feature would indicate that a featuere is supported.

I would like to design the database such that any feature can be added/removed easily at any time (like for example adding Solaris to the list above for features supported).

I initially thought of having the following tables:

ProgramEntry
id, author, name, description, addDate

FeaturesData
prog_id, feature1, feature2, feature3, ....

And whenever I want to add support for a feature in general, I would just alter the table to add a column.

However, this design is not that scalable and flexible. For example, if I would like to also store the date of when a feature of a program was added, then that's not possible with the table design I provided.

Does anyone have any suggestions of how I would design the tables such that it incorporates the ideas I just mentioned?

Thanks for everybody's help.
Reply With Quote
  #2 (permalink)  
Old 03-15-04, 04:19
reneeb reneeb is offline
Registered User
 
Join Date: Jan 2004
Location: Germany
Posts: 167
I would recommend a more flexible structure. I would design it this way:

relations:

program m:n features
program m:n platform
program m:n author

so get seven tables:

table -> columns -> Primary key -> foreign key
program -> id, name, description -> id
features -> f_id, feature_name -> f_id
platform -> p_id, platform_name ->p_id
author -> a_id, authors_name -> a_id
program_author -> id, a_id -> (id,a_id)->id, a_id
program_features -> id, f_id -> (id,f_id) -> id, f_id
program_platforms -> id,p_id -> (id, p_id) -> id, p_id
__________________
board.perl-community.de - The German Perl-Community
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On