Database design for varying amount of relations
What you are describing is called a subtype. A subtype is a common data structure used for things that are very similar but have some differences. For example, and object Named Clothing can be used to describe many types of personal coverings but T-Shirts and Shorts have very different properties. With a Subtype, you store all the common properties in one table and have a related table of the properties that are different. That main table will have a FK to a Type table that will denote which of the subtype tables this object is. 

Entitty: Clothing
ClothingID
ClothingTypeID -> ClothingType
Name
Size
Color

Type Entitty: ClothingType
ClothingTypeID
Name

Now for the subtype tables. You will have one for each value in the Type table.

Entity: TShirt
ClothingID (Subtypes always have the same primary key value as the parent object)
SleeveLength
ColorType

Entity: Shorts
ClothingID
HasPockets
LegLength
IsSwimSuit