473,406 Members | 2,378 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.

Question about database design

Hello Everyone,

I've run into a problem that I can't seem to wrap my head around and I
need some help. I know this might not be the *exact* right place to ask
for help but since my problem *is* with databases and my database of
choice *is* mysql, I thought I'd start here.

Here's the problem:

I am attempting to create a representation of a paper form within a
database. The form basically looks like this:
GOAL:
The description of the overall goal to be met

OBJECTIVE:
- A list of several "objectives" that must be met in order to meet
the goal. These objectives are all in a numbered list on the paper
form.

Now, each objective must be met a certain amount of times within a
given period. Each time an objective is met, the user must check the
"Met" box that will be displayed on the side of the objective. Then,
the user must use several dropdown boxes that contain information on
how the objective was met (static list of ways), when it was met, where
it was met (static list of locations), what staff did in response
(static list of responses), and date/time. Once an objective has been
met the required amount of times for that period it will no longer be
displayed on the HTML representation of the form.

My problem isn't about entering the information into the HTML form but
rather how to create the tables in the database to hold the required
information. I know I'm going to need more than one table. But how
many? How can I best organize this information so that 1) it's
managable and 2) it's not redundent.

How would YOU address this problem? I truly appreciate any guidance
anyone can provide.

Thanks,
Anthony Papillion II

Aug 23 '05 #1
2 1268
Carved in mystic runes upon the very living rock, the last words of
Anthony P. of mailing.database.mysql make plain:
I am attempting to create a representation of a paper form within a
database. The form basically looks like this:
GOAL:
The description of the overall goal to be met

OBJECTIVE:
- A list of several "objectives" that must be met in order to meet
the goal. These objectives are all in a numbered list on the paper
form.

Now, each objective must be met a certain amount of times within a
given period. Each time an objective is met, the user must check the
"Met" box that will be displayed on the side of the objective. Then,
the user must use several dropdown boxes that contain information on
how the objective was met (static list of ways), when it was met, where
it was met (static list of locations), what staff did in response
(static list of responses), and date/time. Once an objective has been
met the required amount of times for that period it will no longer be
displayed on the HTML representation of the form.


CREATE TABLE goals (
GoalID int(11) NOT NULL auto_increment,
Description text
PRIMARY KEY (GoalID)
) TYPE=MyISAM;

CREATE TABLE objectives (
ObjID int(11) NOT NULL auto_increment,
GoalID int(11),
Description text,
ReqTimes tinyint(4)
) TYPE=MyISAM;

CREATE TABLE objmet (
ObjID int(11),
HowMet int(11),
WhenMet datetime,
WhereMet int(11),
StaffResponse int(11),
Something datetime
) TYPE=MyISAM;

CREATE TABLE howmet (
HowID int(11) NOT NULL auto_increment,
Description tinytext,
PRIMARY KEY (HowID)
) TYPE=MyISAM;

CREATE TABLE wheremet (
WhereID int(11) NOT NULL auto_increment,
Description tinytext,
PRIMARY KEY (WhereID)
) TYPE=MyISAM;

CREATE TABLE response (
ResponseID int(11) NOT NULL auto_increment,
Description tinytext,
PRIMARY KEY (ResponseID)
) TYPE=MyISAM;

On the objmet table, you said "when it was met" and "date/time". I don't
know what the difference is; that's what the "Something" field is, there.

--
Alan Little
Phorm PHP Form Processor
http://www.phorm.com/
Aug 23 '05 #2
Carved in mystic runes upon the very living rock, the last words of Alan
Little of mailing.database.mysql make plain:
CREATE TABLE howmet (
HowID int(11) NOT NULL auto_increment,
Description tinytext,
PRIMARY KEY (HowID)
) TYPE=MyISAM;

CREATE TABLE wheremet (
WhereID int(11) NOT NULL auto_increment,
Description tinytext,
PRIMARY KEY (WhereID)
) TYPE=MyISAM;

CREATE TABLE response (
ResponseID int(11) NOT NULL auto_increment,
Description tinytext,
PRIMARY KEY (ResponseID)
) TYPE=MyISAM;


I forgot to mention, these three tables aren't really necessary; you
could just have the information coded into your program.

--
Alan Little
Phorm PHP Form Processor
http://www.phorm.com/
Aug 23 '05 #3

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

Similar topics

22
by: Nunaya | last post by:
We have developed two objects called "customer" and "salesrep". For simplicity, assume that these two objects will talk directly to a database. The database has three tables: customers,...
3
by: Yves Dhondt | last post by:
Hello, I've got the following UML design : C | A _____|______ B So 2 objects A and B are connected through a relation C. (For example an employment scheme : person A1 worked for company...
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...
15
by: designconcepts | last post by:
bo'jour, bo'jour, So I have question to present to the forum about OOD. This is a Csharp forum, but C# is the lang of choice and the question is an exercise based on some comments by the chief...
2
by: Ed_P. | last post by:
Hello, Up to this point, I've been using C# to create simple applications that only use on Project to store Windows Forms and other Files. The project has been complied into an EXE. The exe file...
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...
6
by: Bill44077 | last post by:
Hi, I am new to the MVP pattern and one of the main reasons that we are going this route is because we are doing Scrum with 30 day sprints - so we have a continually morphing design. We are...
0
by: | last post by:
I have a question about spawning and displaying subordinate list controls within a list control. I'm also interested in feedback about the design of my search application. Lots of code is at the...
13
by: John Kraft | last post by:
Friends, I'm working on some crud stuff, and I was looking for opinions on the subject. Below, I have pasted some VERY simple sample code. Class2 is a "traditional" crud type object. In a...
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...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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.