Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9089037
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T22:02:52+00:00 2026-06-16T22:02:52+00:00

I am creating a database and this is my first time that I work

  • 0

I am creating a database and this is my first time that I work with them.

I have one question about the one to one correspondence. I am creating a table that represents a team of a certain sport.

I want that every team will have only one arena where it plays matches and every team will have its own arena.

The arena will have many attributes (name, seats, ticket price and so on) so I would create a table for them even if I have read that the best practise to create a one to one relationship would be to put all in a single table.

Because an arena and a team are two so different concepts i would divide them into two tables in a way like this:

Club
--------------------
ClubID (PK)
ClubName
.
.
.
ArenaID (FK)


Arena
--------------------
ArenaID (PK)
ClubID (FK)
ArenaName
Seats
TicketPrice

Futhermore I thought to put the ArenaID not AutoIncremental but to put it equal to the ClubID because I will create the Arena automatically when a Club will be created.
Is it reasonable?

I want to understand well this type of relationship because it will be used also on other cases (for example every team will always have also one Assistant Coach with his skills).

Thanks to all!

Edit:

@Kevin Bowersox I was only specifying how the game will be, and I thank you for your answer.

@Peter Gluck You should think the arena as an attribute of the club, but it has other own attributes and I want to separate it from the club table to organize better the database. If a club wants to “build” another arena, it simply changes the name of the actual arena and it can change number of seats and ticket price. But the “object” saved in the database will remain the same. Only some columns will be changed.

@Branko Dimitrijevic Thanks for the detailed answer. I want to ask you some questions for better understand what you said (I am starting now to use databases).
In the first example you don’t use two key for both tables that will be, alternatively, one a primary key and the other a foreign key, but you use an only key that is, at the same time, primary and foreign key, is it correct? And what is the difference between these two choices?
Then, you say that it would be better if I put all in single table if I won’t have much team, but i I hope that i will have tens (or maybe hundreds) of thousands teams. In this case is this an enough large number to split the tables? I say this because I have more than only this one to one relationship in this table, so if I put all these one to one relationships in the same table it will be very very large..

Thanks to all for your suggestions, now I will try to use the method with two tables and two different ID keys.
But I will use in other tables the method suggested by ypercube!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T22:02:53+00:00Added an answer on June 16, 2026 at 10:02 pm

    I like the idea of splitting up these tables. It will make your object model work much better.

    However, in regards to:

    Futhermore I thought to put the ArenaID not AutoIncremental but to put
    it equal to the ClubID because I will create the Arena automatically
    when a Club will be created. Is it reasonable?

    I would keep the ArenaID as its own auto integer. What happens if a club switches arenas? This is just one scenario that could cause these keys to become out of sync. I have a feeling over the course of time you will be manually adjusting some of these keys using this approach. Keep your relational database, just that, RELATIONAL and do not rely upon circumstance.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In the first time I have created one Table DEPTS . After that I
This is my first time designing tables in a sql database and I have
I'm creating a database table and I don't have a logical primary key assigned
This might sound like a noob question but this is the first time I'm
This is my first time creating php/mysql code from scratch and Im a little
First time poster, long time lurker :) I have a form setup that posts
So for this one project, we have a bunch of queries that are executed
I am creating a database like this : SQLiteDatabase db = openOrCreateDatabase(mydata.db,SQLiteDatabase.CREATE_IF_NECESSARY,null); try {
I always ignore this option when creating a new database on SQL Server 2005,
I'm creating a new database in my Activity like this: @Override public void onCreate(Bundle

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.