0

I have a database that needs to store the availability of the volunteers for a non profit organization. I was looking at using 2 tables, one holding the choice of yes/no and then joining it multiple times to a table storing the answers in fields based on the day and am/pm. so the table would have a field for each part of a day, eg. SundayAM, SundayPM, MondayAM... etc.

I get the feeling that could be come a mess. I don't want to use yes/no datatypes so the Choice field in the Choices table are strings Yes and No, the availability table just stores the ID of the 2 choices in the choice table. So the SundayAM field would store either a 1 or 2. See this for why I am not using Yes/No field types.

So I was thinking if I had a field that stored a string like "SunAMNPMN,MonAMYPMN,TueAMYPMN,WedAMYPMN,ThuAMYPMY,FriAMNPMY,SatAMYPMY" I could parse it and figure out how to enter and show it on a form through some code. That example is one of 28 (I think) possibilities. Then I could just store that in the Volunteer data table. But I am hoping someone has a better simpler solution than either of my ideas.

  • My current generic comment re "better"/"best" etc: There's no such thing as "better"/"best" in engineering unless *you* define it. Also unfortunately all reasonable practical definitions require a ridiculous amount of experience with a ridiculous number of factors that interact with chaotic sensitivity to details. Make straightforward designs. When you demonstrate via measurement that a design and all alternatives you can think of have problems (whatever that means at the time), then ask a very specific question. Which should also define "better"/"best". – philipxy Apr 15 '18 at 02:24
  • Hi. Time to read a book on information modeling, the relational model & database design. Then read [ask]. Give some particular design(s) in detail & ask a specific question about a specific design decision. – philipxy Apr 15 '18 at 02:29
  • @philipxy I have no idea what you have tried to say in your first comment. Thank you to those who found the discussion previous, although it doesn't exactly answer how to model availability data, it does cut to the heart of the string idea I thought might work. Will be making a table to store fields of availability data. – Alan R Tonn Apr 23 '18 at 08:10
  • *You* used the words "best" & "better". *What did you mean?* https://meta.stackexchange.com/q/204461 PS My first comment is straightforward. (Except maybe "chaotic sensitivity"--google it. If options are ever so slightly different, which is best/better can be very different.) So I have no idea what you mean by "I have no idea". – philipxy Apr 24 '18 at 07:52

0 Answers0