How to model and query spatial responsibilites of company local branches

what are best practices, to model and query spatial responsibilities of company local branches?
My company has many local branches which are all in general responsible for 1 city. This is the easiest case. However, there are some exceptional cases. Here’s a list of all possible cases:

  • branch a is responsible for city a (general case)
  • branch a is responsible for city a, b and c
  • branch a is responsible for disctricts 1 and 2 of city a, whereas branch b is responsible for districts 3, 4 and 5 of city a
  • branch a is responsible for city a and for Foostreet of district 2, whereas branch b is responsible for district 2 of city a
  • branch a is responsible for city a and for odd housenumbers of Foostreet of district 2, whereas branch b is responsible for district 2 of city a
  • branch a is responsible for city a for all customers whose surname begin with letters A-F, whereas branch b has G-K, and branch c has ….
  • branch a is responsible for city a in case of handling Foos, whereas branch b is responsible for city a in case of handling Bars

These are the possible responsibility cases, which could of course also be mixed. The planned system should provide the answer to the question: “Which branch is responsible for city a (or b or c …)?”. If there are exceptional cases, then the question has to be more specific.

Is it possible to provide hints like: “City a has more than one branch, please chose a district!” or “For which case are you asking? Responsible branch for handling Foos, Bars, ….?”

The question which would most likely to be asked is: “Which branch is responsible for Foostreet 345 in 12345 Foocity?”

My requirements are Java Enterprise and a mySQL Database. It may be possible to use MongoDB or Neo4j if it really makes more sense.

I already have database with every city, district, zipcode and street, with which the data could be “connected”.

I hope this question doesn’t sound like: “Please do my job for me.”, but my experience in spatial domain modelling is almost zero.

Since all your criteria are not strictly geographic, I think what you’re looking for falls more closely under faceted search. Faceted search allows the user to “drill down” until they get the information they want, in this case the responsible branch. You see it most frequently on shopping sites. You do a general search, then a list of criteria, or “facets,” appears on the left side. The user then chooses a price range, or a review rating, or a brand name, etc. Searching for computers gives you a different list of facets than searching for clothing.

In your case the facets would be the city, the district, the street, odd or even house numbers, etc. You may not be able to use solr’s faceted search directly, but that should give you a good place to start.

1

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật