Skip to content
Advertisement

Tag: database

Ideal database for geo (map) data

I’m looking for suggestions for an ideal database or data structure for storing a map. Essentially, the map consists of “ways” which are like roads, paths, etc. Ways contain nodes (which have a latitude and longitude coordinate, and sometimes an altitude.) Any such database or structure: should be able to locate all the nodes in a bounding box quickly (milliseconds)

Mysql Complex Where Clause

I really surprised when I tried below code in MySQL: It doesn’t work. I need to get product that is both free_shipping is ‘yes’ AND price equal ‘5’ at the same time. How can I create this query properly? Table Structure: contents: (TABLE 1) content_fields: (TABLE 2) Example (Get product that has 1 ID and its shipping is FREE): Answer

Query to group by maximum depth of PostgreSQL Ltree?

I want to query for all products with the name “Shania Twain”, but I want group them only by the tree with the deepest nlevel. Assuming I have a table like the following with the name categories So, for example, The problem lies with the HAVING clause requiring a boolean expression. The clause MAX(nlevel(cat.tree)) will return an integer. How do

Advertisement