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 7857415
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T21:02:37+00:00 2026-06-02T21:02:37+00:00

I have two entities: Event and Location . The relations are: 1 Event can

  • 0

I have two entities: Event and Location. The relations are:

1 Event can have 1 Location.
1 Location can have many Events.

Basically I want to store events. And each event is hosted in a specific location. When I say specific location I mean:

Street, Number, City, Zip Code, State, Country

I basically have a design question, that I would like some help with:

1 – Right now I am thinking on doing the following:

Event table will have a location_id that will point to a specific location row in the locations table. What happens with this is that:
I will have many repeated values in each row. For example, if an event is happening in 356 Matilda Street in San Francisco, and another one is happening in 890 Matilda Street in San Francisco. The values Matilda Street and San Francisco will be duplicated many times in the location table. How can I redesign that to normalize this?

So, basically I would love to hear a good approach to solve this question in terms of a relational database, like MySQL.

  • 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-02T21:02:39+00:00Added an answer on June 2, 2026 at 9:02 pm

    If you want a strictly normalized database, you could have a table for street names, another for cities, another for states, and so on. You might even have an additional location table that holds unique combinations of street, city, and state; you’d add rows to this table each time an event occurs at a previously unknown location. Then each of your events would reference the appropriate row in the location table.

    In practice, though, it’s sometimes better simply to store the location data directly within the events table and tolerate the extra memory usage; there’s always a trade-off between speed and memory use.

    Another consideration: what happens if a street is renamed? Do you want old events to be associated with the old name or the new name?

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

Sidebar

Related Questions

I have two entities: User and Event. Each user has a list of events
I have two entities User and Event. Each user has a list of events
I have a many-to-many relationship between the two entities called events and artists, both
I have two tables/entities, event and eventRegistrations. I have a gridview showing events, but
I have two entities in Doctrine 2.1: Category and Site each category has many
I have two entities one is Event and another is User. User can like
I have two entities: Event and Comment. @Entity @Table(name = events) public class Event
I have two entities involved in this issue. A user can have an event
I have a parent entity in my model Event. And two child entities: Birthday,
I have two entities: Patient and Job. Patient has a to-many relationship to Job

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.