I was going over AdventureWorks2008 database and wanted to create a new table that associates a product to a sales person.
There is a many-to-many relationship between those tables.
The question is,
Of two schemas, Sales and Production, does ProductSalesPerson table belong to?
ProductSalesPerson doesn't neccessarily belong to either ...
Hello,
I have a SQL question. I'm working with the following set of tables:
http://imgur.com/eg19r.png
The Recipe table contains 5 recipes, Ingredient contains many ingredients (52), and IngredientList is an associative entity, an implementation of the many-to-many relationship between Recipe and Ingredient. RecipeID and IngredientI...
I found this before:
http://stackoverflow.com/questions/1212058/how-to-make-a-composite-primary-key-java-persistence-annotation
There's a code snippet on the first answer:
@Entity
public class UserRole {
@Id
@GeneratedValue
private long id;
@NaturalId
private User user;
@NaturalId
private Role role;
}
So, not using ar...