1

I am new to visual studio and databases. I have tried to find this answer on my own for several days, but I haven't found what I need, probably because I am not using the correct terms.

Short background: I am interested in building a web app that will take user input, store it, and then display that information in charts. Of course, this requires unique user logins.

What I want to understand is how information specific to a unique user is loaded into the site. So far, I've learned to pull static data from a database and put it in the website. However, that does not tell me anything about unique users' data when they log in with their account. So, when I log in to, for example, my online banking account or a site like Udemy, what tells the site to pull only my data? What's the key to displaying just my data?

If you have a resource instead, I'd be happy to read that. Thank you.

1
  • Have a look in the db in the users table and look for the unique identifier of the user, then in your 'other' db tables store information using that users unique id (it's probably a Guid of some form).
    – BLoB
    Commented Apr 17, 2015 at 15:50

1 Answer 1

2

You need some form of a unique identifier for that particular user. Whether this is in the form of a user Id as an auto-incrementing primary key, a Guid, or something else, it should be unique to that user in that particular table.

From that unique user Id you should then be able (depending on the db), to find data associated with that unique user.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.