Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2009
    Posts
    3

    Unanswered: an design option question?

    What the best option for designing the follow, taking into consideration that a planned job must have a startDate, startTime, endDate and endTime. The start can be entered days or weeks before the end and it’s important that the user does not forget to enter any of the fields at the appropriate time. There are also several calculations done on these fields sometimes where the date and time needs to be combined and sometimes when they need to be separate.

    See attached word doc for my 3 options

    Thanks for your help
    Asta
    Attached Files Attached Files

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    how many different startdate and enddate values can a single job have?

    if the answer is 1, then go with option A
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Mar 2009
    Posts
    3
    yes the answer is 1, its just How to I enforce the user to enter the information when all the inforamtion cannot be entered at the same time.

    or is that someting a database designer should not worry about. And how easy it it be done at the front end.

    Thank
    Asta

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    the database designer should be concerned with the correct structure of the data

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  5. #5
    Join Date
    Dec 2007
    Location
    London, UK
    Posts
    741
    It seems like C most accurately represents the business rules you described. The C model prevents Dates being entered without Times (or vice versa). It also ensures that StartDate must be entered before EndDate.

    I'm assuming "ID" is an identifying foreign key in the JobStartInfo and JobEndInfo tables, ie. ID is both a candidate key and a foreign key so that the relationships between the tables are 1 to 0/1.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •