Urban Database design Process

Source: Internet
Author: User

City functions

City superlative

Other states of China (demo)

City lowest level

(Limit the city of the task to this level)

Database

Database fields

Use

Location City: state-City. Name, Data_level,

Derive the popular: number of searches. China-China +1; Guangzhou-Guangzhou +1;

Import data

Manually import major cities in China, major cities in the Americas

At last

Consider how to automatically import

Database relationships

City Table Relationship

Self-join foreign key relationships

Relationship between recruit and city table

Many-to-many

Passing to the front end

Tree structures in domestic and other states

Resident City

Many-to-many

Mission City

Many-to-many

Search process

Single City

    1. Incoming city= China
    2. Search City = City.object.filter (city= ' China ')
    3. Expand city to the lowest level, here for all cities in China
    4. Search for tasks that contain the city

Multiple cities

    1. Incoming city= China | Japan
    2. Find out China, Japan
    3. Expand China, Japan to a set inside
    4. The mission that contains the city

Urban Database design Process

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.