Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i have created a tool that that takes the input and after validating gives the O/p, i have done the programming in PHP and Python and i have connected the tool with SQL server.....when a user gives a i/p it goes to a table_name "Input_Value" in SQL Server then my tool fetches the data and validate it, after validating result goes to Table_name "Output_Value".when another user gives I/p table values get deleted of previous user........if two user tries to validate their value at same time then result mix with each other.
so what logic can i use so multiple user can work on my tool same time and they will get their result separately.

What I have tried:

now i am using logic for one user only. i have one "input_table" and "output_value" table. when another user tries or same users tries again previous values get deleted and new values take places....what if multiple users tries at same time.
Posted
Updated 10-Feb-17 18:27pm

1 solution

Based on your design, in a multi-user environment, the first i/p that comes in may get deleted by next immediate subsequent i/p before it can be picked up for validation. and there is no way to be certain that an output from a validation originated from a particular input. Furthermore, if you do not want to keep the trails of the inputs and the corresponding outputs, why use a database?
Anyway, think of this design if you insist:
input table              output table
input_id (primary key) ---|     output_id (primary key)
input_data                |     output_data
datatime                  |---- input_id
                                datetime

Introduction to database design[^]
1NF, 2NF, 3NF and BCNF in Database Normalization | DBMS Tutorial | Studytonight[^]
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900