PK 와 FK 에 대해 질문하고 싶습니다.
다음 쿼리는 Northwind DB 의 테이블들 입니다.
Orders 테이블에는 CusotmerID 와 EmployeeID 가 FK 로 잡혀 있습니다.
또, Customers 와 Employees 테이블에는 CustomerID 와 EmployeeID 가 PK 로 잡혀 있습니다
select * from Orders as ord
Join Customers as cust on (cust.CustomerID = ord.CustomerID)
Join Employees as emp on (emp.EmployeeID = ord.EmployeeID)
질문은 만약,
PK 와 FK 를 설정하지 않고 작업할 경우 문제 되는 것은 어떤 것이 있나요?
실체 무결성과 참조 무결성에 문제가 있겠지요.