From the course: Oracle Database 19c: Advanced SQL
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Foreign key constraints - Oracle Database Tutorial
From the course: Oracle Database 19c: Advanced SQL
Foreign key constraints
- [Instructor] Oracle database constraints natively ensure data integrity, and Foreign key constraints with its optional associated index is one of those constraint types. So let's get the details on the Foreign key constraint how it can be created and used, and how it's different from the other types of constraints available in an Oracle database. From a relational database perspective, you want to ensure what is know as referential integrity between tables. In the tables Departments and Employees, each employee should be tied to a department by the Department ID column. It's called a one-to-many relationship between Departments and Employees and that's represented by the crow's foot symbol. At the top of the crow foot is the parent table; at the bottom is the child table. Here, I'll show you how to generate the data model diagram from SQL Developer. Start with File, Data Modeler. Select Import, and import from the Data Dictionary. It's the Data Dictionary of one of the databases…