Skip to main content
formating, remove sorry
Source Link
Julien Vavasseur
  • 10.2k
  • 2
  • 28
  • 46

What's What is the most efficient way to make a Locality Entity (Town, City, Village etc) with a Country Entity?

I am new to Database.

I have a database with a UserProfile Entity. I need to add a Country and Locality(City, Town, Village) to the UserProfile.

What is the most efficient way of doing so?

This is what I have:

Locality

  • PK UN LocalityID
  • UN LocalityName

Country

  • PK UN CountryID
  • UN CountryName

UserProfile

  • Username...Password...etc
  • FK CountryID
  • FK LocalityID

P.S I apologize in advance if this is the wrong way to ask help about this topic. My first post on databases.

What's the most efficient way to make a Locality Entity (Town, City, Village etc) with a Country Entity?

I am new to Database.

I have a database with a UserProfile Entity. I need to add a Country and Locality(City, Town, Village) to the UserProfile.

What is the most efficient way of doing so?

This is what I have:

Locality

  • PK UN LocalityID
  • UN LocalityName

Country

  • PK UN CountryID
  • UN CountryName

UserProfile

  • Username...Password...etc
  • FK CountryID
  • FK LocalityID

P.S I apologize in advance if this is the wrong way to ask help about this topic. My first post on databases.

What is the most efficient way to make a Locality Entity (Town, City, Village etc) with a Country Entity?

I am new to Database.

I have a database with a UserProfile Entity. I need to add a Country and Locality(City, Town, Village) to the UserProfile.

What is the most efficient way of doing so?

This is what I have:

Locality

  • PK UN LocalityID
  • UN LocalityName

Country

  • PK UN CountryID
  • UN CountryName

UserProfile

  • Username...Password...etc
  • FK CountryID
  • FK LocalityID
Source Link

What's the most efficient way to make a Locality Entity (Town, City, Village etc) with a Country Entity?

I am new to Database.

I have a database with a UserProfile Entity. I need to add a Country and Locality(City, Town, Village) to the UserProfile.

What is the most efficient way of doing so?

This is what I have:

Locality

  • PK UN LocalityID
  • UN LocalityName

Country

  • PK UN CountryID
  • UN CountryName

UserProfile

  • Username...Password...etc
  • FK CountryID
  • FK LocalityID

P.S I apologize in advance if this is the wrong way to ask help about this topic. My first post on databases.