r/DatabaseHelp • u/mackkey52 • Feb 04 '18
Database design HELP!
I am building a database for an app that I’m developing and have a question about how I should have my users access the database. My first thought was that I would have a global account that would create the user when they register and the user would use their MySQL username and password that they create. My second thought would be instead of using individual user accounts when a user registers, a table is created with a username and password column and when the user “ logs in” the global account checks to see if there is a table that matches the username and password columns and the global account handles the adding/removing of data within the table. I was thinking the first option makes cracking passwords more likely due to the high number of users but the second option only has one global account to crack however if the global account was cracked it would be able to manipulate all the tables from a single account? What should I do? Hopefully I conveyed my thoughts clearly and any help/advice is appreciated.
View all comments
Show parent comment
1
u/mackkey52 Feb 05 '18
Thanks another question I have is when would a table have more than one row? I had read that you should divide your “entities” in this case users and each entity would be an individual table, but if all users have the same data elements could they all be in one table with views made for each user?