Oracle Human Resources (HR) Schema İnceliyoruz



Oracle örnek objectlerin ve dataların olduğu Human Resources (HR) schema'sını geliştiriceler için hazır sunuyor. Bu schemayı incelediğimizde Employees, Departments, Locations, Countries, Regions, Jobs ve Job_History tablolarının olduğunu görüyoruz. Employees tablosu Departments tablosu ile, Departments tablosu Locations tablosu ile, Locations tablosu Countries ile, Countries tablosu Regions ile, Employees tablosunun kendisi ile, Employees ve Departments tablosunun Job_History ile ilişkili olduğunu görüyoruz.

Bu diagram üzerinden mavi olarak belirtilen kolonlar Primary Key olan kolonlardır. Primary Key olan kolon unique ve not null'dır. Job_History tablosunda iki kolon birden Primary Key için kullanılmıştır. Buna composit pk denir. Employees tablosundaki manager_id kolonu self joi ile yine Employees tablosundaki employee_id kolonunu referans almıştır. Employees tablosu Departments tablosundaki department_id ile Fk, Departments tablosu Locations tablosundaki location_id ile Fk, Locations tablosu Countries tablosundaki country_id ile Fk ve Countries tablosu Regions tablosundaki region_id ile Fk ilişkilidir. Genellikle FK olan bir kolon başka bir tablodaki PK kolonunu referans alır.
Share:
spacer

Hiç yorum yok:

Yorum Gönder