Добрый день. Необходимо сейчас проектировать базу данных. И возникла такая задача: У нас есть в системе пользователи. У пользователей есть общие данные. А также ссылки на таблицу пользователей других таблиц. Но, при этом, сами пользователи могут различаться ролями. И, в зависимости от роли, у них разные дополнительные данные и ссылки из других таблиц. Как такое грамотнее будет реализовать, в т.ч точки зрения нормализации БД? Идея запихунть все в одну таблицу - не очень нравится. Пока есть следующие предположения - Выделяем общую таблицу User. И также отдельные таблицы с дополнительными данными для каждой нужной нам роли. Из этих таблиц unique foreign key на таблицу User. Но, как мы понимаем, unique будет работать только на таблицу конкретной роли, а не на все, что не всегда может быть хорошо.
←
1
2
3
→
Ответ на:
комментарий
от crutch_master

Ответ на:
комментарий
от crutch_master

Ответ на:
комментарий
от yyk

Ответ на:
комментарий
от crarkie

Ответ на:
комментарий
от crutch_master

Ответ на:
комментарий
от yyk

Ответ на:
комментарий
от yyk

Ответ на:
комментарий
от crutch_master

Ответ на:
комментарий
от crutch_master

Ответ на:
комментарий
от crutch_master

Ответ на:
комментарий
от yyk

Ответ на:
комментарий
от yyk

Ответ на:
комментарий
от yyk

Ответ на:
комментарий
от yyk

Ответ на:
комментарий
от crutch_master

Ответ на:
комментарий
от crutch_master

Ответ на:
комментарий
от yyk

Ответ на:
комментарий
от crutch_master

Ответ на:
комментарий
от crutch_master

Ответ на:
комментарий
от Deleted

Ответ на:
комментарий
от Deleted

Ответ на:
комментарий
от crutch_master

Ответ на:
комментарий
от crutch_master


Ответ на:
комментарий
от crutch_master

Ответ на:
комментарий
от Deleted

Ответ на:
комментарий
от peregrine

Ответ на:
комментарий
от Deleted

Ответ на:
комментарий
от ritsufag

Ответ на:
комментарий
от crutch_master

Ответ на:
комментарий
от monk

Ответ на:
комментарий
от crutch_master

Ответ на:
комментарий
от yyk

Ответ на:
комментарий
от monk

Ответ на:
комментарий
от crutch_master

Ответ на:
комментарий
от monk

Ответ на:
комментарий
от crutch_master

Ответ на:
комментарий
от monk

Ответ на:
комментарий
от crutch_master

Ответ на:
комментарий
от crutch_master

Ответ на:
комментарий
от crutch_master

Ответ на:
комментарий
от monk

Ответ на:
комментарий
от monk

Ответ на:
комментарий
от crutch_master

Ответ на:
комментарий
от monk

Ответ на:
комментарий
от monk

Ответ на:
комментарий
от crutch_master

Ответ на:
комментарий
от monk

Ответ на:
комментарий
от crutch_master

Ответ на:
комментарий
от crutch_master

Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.
Похожие темы
- Форум Проектирую схему БД (2013)
- Форум Выборка данных из MySQL где значение столбца растёт или падает. (2016)
- Форум проектирование БД (2015)
- Форум Проектирование БД (2014)
- Форум Проектирование БД (2004)
- Форум Проектирование БД (2006)
- Форум Связь many-to-many (2021)
- Форум Уникальные значения из нескольких столбцов таблицы MySQL (2015)
- Форум Проектирование таблиц в БД (2014)
- Форум Работа с множествами (2013)