I am wondering how I can create one, when I have a OneToMany relationships between tables.
For Instance I have a table that keeps track of Directory Names ( Which are Unique, i.e the Directory Name is the Primary Key ).
Now I have another table that has list of files
So I need to create a constraint, where the Directory Name will map to only one File name, and shouldn't have any duplcate file names in this Directory. Especially when multiple threads are trying to create the same entry.