Table with java class relationships

to sum up:

  Table corresponding to the class name, attribute name corresponding to the field name

  java: many to many: each class attributes add a set of the other class  

     Many: to add a property of one of a set of classes of the other, a number of other properties to add one class

       One: each class add a property of the other class

 

  Table: many to many: establishing an intermediate table, the intermediate table contains two foreign keys, the other two are the primary key table

    

    Many: establishing a multi-party multi-field as a foreign key in another table

    One: optionally establish one field as a foreign key in another table

 

Contact between the table is established through the outer primary bond (the foreign key: the primary key of another table)

Guess you like

Origin www.cnblogs.com/wskb/p/11859034.html