mardi 15 août 2017

football / soccer software design pattern

A basic question.

Think of football/soccer. I thought about making a design pattern for it, but wanted to know if there is already one out there.

It goes as follwing:

I want to create a football player.

We have a gender. (Male and Female).

A gender have a Series Category (for example for young under 19, for young under 18 etc.).

That Series Category is placed in a region (or state whatever).

And that Region has its series' name (for example series 1, series 2, division 1 etc.).

For example, I want to make female, Senior, she plays in Birmingham, and is in the first division.

I want to map this into the database, but I wanted to follow a software design pattern, but I do not know if there is a software design pattern for this purpose.

My attempt is like this:

Gender
{
   int GenderID 
   GenderType 
}

SeriesCategory
{
   int SeriesCategoryID
   string SeriesCategoryName
   int GenderID
}

Region
{
   int RegionID
   string RegionName
   int SeriesCategoryID
}

Series
{
   int SeriesID
   string SeriesName
   int RegionID
   int SeriesCategoryID
}

Aucun commentaire:

Enregistrer un commentaire