Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2015
    Posts
    1

    Unanswered: Design Many to many

    I am wanting to design a simple software to manage checklists.

    I have a following tables in mind

    checklist task_types applicable_checklist tasks task_checklist

    ID ID ID ID
    CL_NAME TT_NAME FK_CHECKLIST FK_TASK_TYPES
    FK_TASK_TYPES TASK_DETAILS


    Checklist will be applicable to a particular tasktype.

    For all tasks of a particular task type, the checklists will have to be fulfilled.

    Should the table task checklist have foreign key of checklist or applicable checklist?

  2. #2
    Join Date
    Nov 2015
    Posts
    6
    I would use a foreign key of checklist because the tasks relate to checklists.

    If you want to ensure at the database-level that a task is not assigned a checklist which it should not have you could use a trigger to validate new relations.

Tags for this Thread

Posting Permissions

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