Hello, I'm new to the forum and have a question about a database design and the resulting relationships.

I'm creating a database which (amongst other things) will hold fixtures for a sports league.

I have the following two important tables:

FIXTURES
fixture_id (KEY)
home_team_id (FOREIGN)
away_team_id (FOREIGN)
etc...

Teams
team_id (KEY)
team_name
etc...

my question is whether the relationship link between:

  • team_id -> home_team_id
  • team_id -> away_team_id

is normalised and acceptable?

I hope I've given sufficient details.

Many thanks for your help.

yes


PS it's a popular homework question, pops up regularly in many forums, and at regular intervals. And it was in my course several years ago too.

Great :)

Thanks for the confirmation!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.