0

I have a step by step wizard. User may complete the steps in multi sessions I need to keep record which steps are completed by user. Order of step may not be important. User may complete step 4 and then later complete step 3. but I have to make sure that user process each step at least one. When User have processed all steps wizard will be marked as completed. I have following tables

WizardBase
WizardID, userID

Step1 Table
.......
Step2 Table
.......
and so on

One option that come to mind is to have bits in Wizard table for each step and when user complete the step bit will be made true as shown below

WizardBase
WizardID, userID,IsStep1Done,IsStep1Done,...

Any better suggession. I have max of to steps

1 Answer 1

0

If the only thing you record about each step is whether or not it is completed then you really can't justify turning each step into its own row, let alone its own table. This is especially true if the number of steps is going to be pretty static.

If on the other hand, you record several facts at each step, and if these facts are specific to each step, then having different tables for each step is one reasonable option.

Another option, particularly if you needed to table-drive the rules for your steps, would be an Entity-Attribute-Value (EAV) structure. You shouldn't use EAV however, unless your need for schema flexibility (table-driven rules) outstrips other design considerations.

Sign up to request clarification or add additional context in comments.

1 Comment

yes each step has several facts that's why i made separate tables. Also there is also case that in processing the step no data entered in table you may think of Payroll calculation steps where loan deduction is a step and if no employee has taken the loan step will not enter loan related info for that loan step

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.