IWETHEY v. 0.3.0 | TODO
1,095 registered users | 1 active user | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New DB design answers:
1) No, since the values won't be unique, you can't have a unique key. You can have an index (or several) to help with the sorting.

2) Dunno, never used that.

3) This isn't a one-to-many or a many-to-one relationship either way, is it... You can have the same people in several incidents? And several people in the same incident? Yup, for many-to-many relationships you need a "junction" table, like "people_and_incidents". Two columns, "person_id" and "incident_id", foreign keys to the (primary-key) ID columns of those tables.

1) Nope. At least, not unless you put a default value ("N/A" or something, whatever) in the "Unit" field. But then it's of course not really optional anymore.

But, above all: The main thing you need to do is put an integer ID field -- autoincrement, sequence, whatever it's called in your (R?)DBMS -- in pretty much every table. That's your primary key, and what you refer to as a foreign key from other tables.
--
Christian R. Conrad
Same old username (as above), but now on iki.fi

(Yeah, yeah, it redirects to the same old GMail... But just in case I ever want to change.)
New I should have mentioned in the request, this was for an event 7/21 - 7/23
So I appreciate the reply but yeah, it's already done. :)
--

Drew
New Ah. On vacation, been kind'a offline for a week or so.
     DB design questions - (drook) - (9)
         No answers, but... - (a6l6e6x) - (5)
             This, plus... - (scoenye) - (4)
                 Ah, I tried it as the primary. - (drook) - (3)
                     Fifth/5th... - (Another Scott)
                     Dont forget jr, sr, III, etc living at same home - (crazy) - (1)
                         I need to be less ambitious - (drook)
         DB design answers: - (CRConrad) - (2)
             I should have mentioned in the request, this was for an event 7/21 - 7/23 - (drook) - (1)
                 Ah. On vacation, been kind'a offline for a week or so. -NT - (CRConrad)

There’s nothing we like more than appearing to be open minded.
56 ms