Skip to content

Other data structure example

Erick Navarro edited this page Aug 30, 2017 · 1 revision

Following this data structure you could create other sorts of apps, real estate or maybe delivery:

{
    "estates_details":{
        "us_kansas":{
            "hjoijpojwdwda":{
                "photos":[
                    "http://prettyphoto2.com",
                    "http://prettyphoto1.com"
                ],
                "photo": "http://prettyphoto.com",
                "price": 500000,
                "name": "Big Loft",
                "latitude": -33.429072,
                "longitude": -70.603748
            },
            "llmlwndlawndkawnd":{
                "photos":[
                    "http://prettyphoto2.com",
                    "http://prettyphoto1.com"
                ],
                "photo": "http://prettyphoto.com",
                "price": 500000,
                "name": "Luxury Condo",
                "latitude": -33.439072,
                "longitude": -70.613748
            }
        },
        "us_california":{
            "wadknawoidjaw9d":{
                "photos":[
                    "http://prettyphoto2.com",
                    "http://prettyphoto1.com"
                ],
                "photo": "http://prettyphoto.com",
                "price": 500000,
                "name": "Spanish Style",
                "latitude": -33.429072,
                "longitude": -70.603748
            },
            "w9sjaw0jd":{
                "photos":[
                    "http://prettyphoto2.com",
                    "http://prettyphoto1.com"
                ],
                "photo": "http://prettyphoto.com",
                "price": 1000,
                "name": "2 bedrooms, 2 bathrooms",
                "latitude": -33.439072,
                "longitude": -70.613748
            }
        }
    },
    "real_estates":{
        "us_kansas":{
            "hjoijpojwdwda":{
                "price": 500000,
                "name": "Big Loft",
                "latitude": -33.429072,
                "longitude": -70.603748
            },
            "llmlwndlawndkawnd":{
                "price": 500000,
                "name": "Luxury Condo",
                "latitude": -33.439072,
                "longitude": -70.613748
            }
        },
        "us_california":{
            "wadknawoidjaw9d":{
                "price": 500000,
                "name": "Spanish Style",
                "latitude": -33.429072,
                "longitude": -70.603748
            },
            "w9sjaw0jd":{
                "price": 1000,
                "name": "2 bedrooms, 2 bathrooms",
                "latitude": -33.439072,
                "longitude": -70.613748
            }
        }
    },    
    "estates_category":{
        "us_kansas":{
            "hjoijpojwdwda": "rental",
            "llmlwndlawndkawnd": "closure"
        },
        "us_california":{
            "wadknawoidjaw9d": "sale",
            "w9sjaw0jd": "closure"
        }
    }
}

In the real estate example you have some very similar indexing to what is seen before. The funnel node for this is the country plus the city name.

{
    "routes":{
        "2017_08_28":{
            "awkdbawoidboawidb":{
                "package": "awkdbawoidboawidb",
                "receiver": "Nice Person 1",
                "latitude": -33.429072,
                "longitude": -70.603748
            },
            "aowidh09awhdoaiwhd":{
                "package": "aowidh09awhdoaiwhd",
                "receiver": "Nice Person 2",
                "latitude": -33.439072,
                "longitude": -70.613748
            }
        },
        "2017_08_27":{
            "wadknawoidjaw9d":{
                "package": "wadknawoidjaw9d",
                "receiver": "Nice Person 3",
                "name": "center included",
                "latitude": -33.429072,
                "longitude": -70.603748
            }
        }
    },
    "packages":{
        "2017_08_27":{
            "wadknawoidjaw9d":{
                "package_id": "wadknawoidjaw9d",
                "size": "Huge!",
                "delivered": false,
                "priority": "Same Day Delivery",
                "address": "P. Sherman 42 Wallaby Way"
            }
        }
    }
}

In the delivery example, the delivery shifts are organized by date, and the date it self is the funnel node.

The funnel node is being mentioned several times in this documentation, that term has being preffered to emphasize the role of it, to narrow down the data. But a funnel node, as has being called here, is part of the data fan-out structure. You can read more about it:

High five

Clone this wiki locally