473,406 Members | 2,713 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Database design question

I'm in the process of designing a database and would like some
suggestion on how to architect it.

I have 3 'objects', frequency, task, skill.

For each task there is a frequency however for some tasks there are a
number of different skills, each of which have different frequencies,
so, for example, imagine frequencies being time in minutes. Each task
has to be done a certain number of times but certain tasks have varied
skill levels and each skill level has different frequencies associated
with it.

Task 1, Freq 5min
Task 2, Freq 10min
Task 3, Skill 1, Freq 5min
Task 3, Skill 2, Freq 15min
Task 4, Skill 1, Freq 10min
Task 4, Skill 2, Freq 15min
Task 4, Skill 3, Freq 20min

The problems is that the freq / skill is dependent on the task. I'm
having trouble deciding how to build this database.

I could just hard code the Tasks/Skill in a table so that I have

TaskID PK
Task
Freq

and have records like:

1 Task1 5
2 Task2 10
3 Task3Skill1 5
4 Task3Skill2 15

but I don't like it because it is not easily maintained - in case
freq/skills change.

Does anyone have any ideas. The important information is the
frequency as it will be used to build timetables.
Jul 20 '05 #1
1 3596
>> I have 3 'objects', frequency, task, skill. <<

Basic question - in your business model are these separate entities or
attributes of an entity? What are the dependencies among them? The answer to
these questions lay the foundation for the table design.
I could just hard code the Tasks/Skill in a table ... <<


That violates 1NF (assuming tasks & skills are different attributes) and
based on my interpretation of your requirements would cause an update/delete
anomaly. Generally database design cannot be accomplished using Newsgroup
responses since it requires a comprehensive understanding of your underlying
business model, rules & requirements. However, based on a series of
assumptions, here is one way of SQL representation :

CREATE TABLE Tasks (
Task_id INT NOT NULL PRIMARY KEY,
Details VARCHAR(30) NOT NULL,
....);

CREATE TABLE Skills (
Skill_id INT NOT NULL PRIMARY KEY,
Decription VARCHAR(40) NOT NULL,
...);

CREATE TABLE TaskSkills (
Task_id INT NOT NULL
REFERENCES Tasks(Task_id),
Skill_id INT NOT NULL
REFERENCES Skills(Skill_id),
Freq INT NOT NULL
PRIMARY KEY(Task_id, Skill_id));

--
- Anith
( Please reply to newsgroups only )
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Lefevre, Steven | last post by:
Hey folks - Thanks to everyone who gave input to my concerns. Of course, we don't intend to have the mysql port open to the world. We will have Apache/PHP connect on a unix socket, or to another...
2
by: Josh McFarlane | last post by:
If this is not the right place to post this, I apologize. I've taken over work for a few utility programs for a collection of database / raw files. All the programs but one read from the files,...
5
by: Don Vaillancourt | last post by:
Hello all, Over the years as I design more database schemas the more I come up with patterns in database design. The more patterns I recognize the more I want to try to design some kind of...
29
by: MP | last post by:
Greets, context: vb6/ado/.mdb/jet 4.0 (no access)/sql beginning learner, first database, planning stages (I think the underlying question here is whether to normalize or not to normalize this...
12
by: nyathancha | last post by:
Hi, I have a question regarding best practices in database design. In a relational database, is it wise/necessary to sometimes create tables that are not related to other tables through a...
1
by: arrival123 | last post by:
Hello, I'm currently trying to decide on a database design for tags in my web 2.0 application. The problem I'm facing is that I have 3 separate tables i.e. cars, planes, and schools. All three...
10
by: ARC | last post by:
Hello all, General question for back-end database that has numerous date fields where the database will be used in regions that put the month first, and regions that do not. Should I save a...
4
by: dgleeson3 | last post by:
Hello all I am creating a VB.Net distributed SQL server 2005 application. Each computer in the system has a database with a table of users and their telephone numbers. Each computer has a...
0
by: David | last post by:
Hi list. I have a few database-related questions. These aren't Python-specific questions, but some of my apps which use (or will use) these tables are in Python :-) Let me know if I should ask...
10
by: Les Desser | last post by:
In article <fcebdacd-2bd8-4d07-93a8-8b69d3452f3e@s50g2000hsb.googlegroups.com>, The Frog <Mr.Frog.to.you@googlemail.comMon, 14 Apr 2008 00:45:10 writes Not sure if I quite follow that. 1....
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.