navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Database Design Question?

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Database Design Question?
Page: [1]
 
Welby

 

Posts: 59
Joined: 11/12/2002
Status: offline

 
Database Design Question? - 11/15/2002 8:47:48   
I' m not sure if this is a database design question that needs to be posted somewhere else - if so, I apologize in advance.


I' m trying to setup a webpage form that posts data into a database. Most of the data will be pulled from other static tables (employee name, location, etc...) At the bottom of the form, I will have a list of items (problems). This is actually an OSHA inspection form. There will be multiple lines on the problem section of the form. For example - missing fire extinguisher, no exit sign, exposed wires.....

My question is - is there a way to have multiple problems in one table. I don' t want to make a table that has the following colums\fields: problem1 - problem2 - problem 3 etc.

I' m not sure if it' s possible or not - I would appreciate any help that anyone can give, or if you know of another website where I can post SQL related questions - I' d be much appreciative!


Thanks in advance!

Welby
rdouglass

 

Posts: 9279
From: Biddeford, ME USA
Status: offline

 
RE: Database Design Question? - 11/15/2002 10:04:44   
Sounds like a table relation issue. Absolutely this can be done (based on what you told us). However, it wouldn' t be in the same table, just the same DB. If it were me, I' d start by building a second table (for problems) and relate it back to your main table via RecordID (or other Primary Key field).

Where specifically are you having problems.

(in reply to Welby)
Welby

 

Posts: 59
Joined: 11/12/2002
Status: offline

 
RE: Database Design Question? - 11/15/2002 10:24:24   
Actually - the way the database is setup now - I have multiple tables:

Employee -- all employee info (10 fields)(static - doesn' t change)
Location -- Office location info(10 fields)(Static - doesn' t change)
Code -- OSHA problem codes (3 fields - code - item - details) (Static Doesn' t Change)

These 3 tables are linked to a table called inspection (this is where all the information gets added into) that pulls emp name from Emp table - location name from loc table - manager name from emp table - and error codes (or problems ) from code table. The problem I' m having, is when a user fills in a report - and the data is input into the database (inspection table) then the inspection table ends up looking like this:
location - emp name - manager name - code1,item1,details1 - code2,item2,details2 - code3,item3,details3

the code - item- details repeats 10 times. This gives the user the opportunity to input 10 different OSHA violations.

Welby

(in reply to Welby)
rdouglass

 

Posts: 9279
From: Biddeford, ME USA
Status: offline

 
RE: Database Design Question? - 11/15/2002 10:50:36   
AFAIK the DRW will ony UPDATE / INSERT to 1 table at a time. I still would reccomend a separate table for problems, but you may not want / be able to use the DRW for updates.

You actually may still be able to use the DRW (for separate tables), but you' d have to put several on the UPDATE / INSERT page and you' d be making multiple DB calls (not recommended).

If it were me, I' d build an update / insert page NOT based around the DRW. How comfortable are you with ASP?:) That' s how I would do it. It can be done (I do it in lots of places), but to update 2 tables at the same time, I' ve never been sucessful using the DRW....

(in reply to Welby)
enrightd

 

Posts: 1034
Joined: 12/5/2001
From: Rock Hill SC USA
Status: offline

 
RE: Database Design Question? - 11/18/2002 10:36:27   
rdouglass:

quote:

AFAIK the DRW


What did you say?
What language is this?

Dan

(in reply to Welby)
Mike54

 

Posts: 4789
Joined: 3/26/2001
From: Way Up Over
Status: online

 
RE: Database Design Question? - 11/18/2002 11:51:38   
quote:

What did you say?
What language is this?


He said " As Far As I Know the Databse Results Wizard..." :):)[:p]:)

_____________________________

Who was the first guy that looked at a cow and said, "I think that I'll drink whatever comes out of those things when I squeeze them"?

New photogalleries, stop by sometime.

(in reply to Welby)
enrightd

 

Posts: 1034
Joined: 12/5/2001
From: Rock Hill SC USA
Status: offline

 
RE: Database Design Question? - 11/18/2002 12:08:36   
Mike:

Thanks

Dan

(in reply to Welby)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Database Design Question?
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts