0

I'm designing a workflow and stuck on a problem. I would have table WORKFLOW where name would be stored. Table WORKINS would be instances of workflow definition. Then Workflow is composed with:

  • TASK blocks (assigned to users or groups, expiration date,...)
  • EMAIL blocks (where subject, email and recipients would be stored)
  • DATABASE executions (SQL would be stored)
  • CONDITIONS (on witch flow will go. IF something go one way, else go another)

My question is if this tables go in ONE table called ACTIVITY or on separate tables (TASK, EMAIL, QUERY, CONDITION).

If going in with single table there would be more columns that fits all need. TRANSITIONS (table) between ACTIVITIES would be easy (current, next).

If going with multiple tables then TRANSITION will be harder. column for all current TASK/CONDITION/QUERY/EMAIL and columns for next TASK/CONDITION/QUERY/EMAIL.

What would be the best solution for the problem?

Mr. Nice
  • 357
  • 2
  • 16
  • 1
    Possible duplicate of [How can you represent inheritance in a database?](https://stackoverflow.com/questions/3579079/how-can-you-represent-inheritance-in-a-database) – philipxy Oct 22 '18 at 08:17
  • @philipxy What would then TRANSITION table look like? – Mr. Nice Oct 23 '18 at 10:10
  • Please act on [ask] & hits googling 'stackexchange homework'--give some design(s). – philipxy Oct 23 '18 at 17:29

0 Answers0