[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

I have 3 types of users for my mysql database: >Admins >Suppliers

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 3
Thread images: 1

File: MusicLA_JBREAK-1.jpg (53KB, 640x426px) Image search: [Google]
MusicLA_JBREAK-1.jpg
53KB, 640x426px
I have 3 types of users for my mysql database:

>Admins
>Suppliers
>Employees

Would it be acceptable to have my database organized like this?
>user_type (description of each user type along with number)
>user_info (names/passwords/usernames/etc)
>user_admin
>user_suppliers
>user_employees

The last three tables will have specific info for each type.
>>
>>347569
Maybe?

You're not really giving much detail here about what "specific info for each type" is.

Unless there's some kind of relational mapping between your proposed tables, i.e. one user_info can have more than one user_type, then they should all be the same table.

If every row of user_info can have only one user_type, and every row of user_type can have only one user_info, then they're really the same thing, and by putting them in different tables you're confusing the query planner and making it possible to violate your schema without the database noticing it.
>>
>>347694
I think he is talking about roles but doesn't know that roles exist and thinks that everything is a table.
Thread posts: 3
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

If you need a post removed click on it's [Report] button and follow the instruction.
If you like this website please support us by donating with Bitcoin at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties. Posts and uploaded images are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that website. If you need information about a Poster - contact 4chan. This project is not affiliated in any way with 4chan.