-1

I have a question and hopefully not look dumb. I am developing an application and I need the database Web service multiple users store data so that later they can access their data on specific data without mixing with other users.

I thought that the solution might be to increase each of my tables the userid attribute is foreign key to the user table. However, I wonder if there is a better solution to this something that requires change all tables.

I appreciate any help !!!!

alexandresaiz
  • 2,678
  • 7
  • 29
  • 40
  • The solution is to have a user table and relate the userid to each of the individuals data. This is very simple in sql and the database should be designed before you start the app. – Dane Sep 16 '15 at 15:33
  • With PostgreSQL schemes working fine – Israel L Rosas Apr 08 '17 at 12:19

1 Answers1

0

First of all we should have a UML picture to understand what is "data" and what it means. As a blind man in the darkness i can advise you that:

you should have a table with users, and a table with data with userId as a foreign key to the relevant data.