Matching values with foreign keys

  Вход на форум   логин       пароль   Забыли пароль? Регистрация
On-line:  

Раздел: 
Жилые комплексы на Бухарестской - "Изумрудный Остров" и "Респект" / Компьютеры, сети / Matching values with foreign keys

Страницы: 1  новая тема

Автор Сообщение

Гость
Добавлено: 21-08-2017 11:47
Hi,

I know this is most likely databases 101, however I am having some trouble figuring out how to get values in to my foreign keys. I will explain my solution and aim of the database deign and how I setup my tables, hopefully I can get some insight into how I need to design this to get corresponding matches into my tables.

So lets say I have three tables; Employees, Department and Unit.

I am making somewhat of a mini-data warehouse and I have setup an autogenerated primary key to all three of these tables.

Within the Employee table I have a foreign key reference to the primary key in the Department's table (PK_DepartmentID) and the primary key the unit's table (PK_UnitID) setup.

I have also setup a foreign key in the unit's table (FK_DepartmentID) to refer to the primary key in the Department's table.


For more you can check

Data warehousing video

Страницы: 1  новая тема
Раздел: 
Жилые комплексы на Бухарестской - "Изумрудный Остров" и "Респект" / Компьютеры, сети / Matching values with foreign keys

Отвечать на темы в данном разделе могут только зарегистрированные пользователи

Отвечать на темы могут только зарегистрированные пользователи

KXK.RU