Search results

  1. M

    Optional foreign keys

    Thank you so much, The_Doc_Man. Sound words of advice there. :) Following your and Solo712's advice, I've used a UNION query in order to keep RI between tables in the example attached. (only used two tables, Clients and Suppliers, but the principle is the same for extra tables) However, I think...
  2. M

    Optional foreign keys

    Yes, they are simple examples for illustrative purposes only. I've been reading quite a bit on database normalization and going through some examples but couldn't find anything similar to this case. So I was wondering if it would be possible to have optional foreign keys while maintaining...
  3. M

    Optional foreign keys

    Assigning a user to a task is not a problem. That involves a one to many relationship and that's it. The issue is assigning a task to a category (ie. a Client or a Supplier, different tables, different foreign keys) while maintaining the relationships referential integrity. That's what I'm...
  4. M

    Optional foreign keys

    Indeed. That's definitely a possibility. :) But for the sake of argument, let's say that the tables structure is significantly different. eg, PROSPECTS only contains basic contact information, while SUPPLIERS have a considerable amount of extra fields. Or that they all have different tables...
  5. M

    Optional foreign keys

    Just added two attached examples. In one the tasks are split into different tables. In the other there's an added Category field to differentiate the tasks. (not even sure it will be necessary) In both examples Referential Integrity is enforced. Which one is more correct / practical ? Any...
  6. M

    Optional foreign keys

    Greetings. I’m trying to figure out what the data modelling best practice is, regarding a situation where a table can be connected to several others using an “optional” foreign key. To better illustrate the example, let say we have a TASKS table. Each task is assigned to a user from the USERS...
Back
Top Bottom