API methods + binary link + M:M tables

Olivier vidal_olivier at yahoo.fr
Mon Jan 31 15:22:08 CST 2005


Hi Ruslan,

I try to think only in navigationnal way to use the API methods.
But in the following problem, I do not see how I can have an effective 
API code:


I shall like knowing how much there is of persons having the same 
surname in every city. (Statistics).

For example:

PARIS:

Name 	 Counts

name1	 500
name2 	 300
name3 	 100

(thus, there 100 persons at Paris having the surname "name3")

BORDEAUX:

name1	 300
name2	 150
name3 	 80

..............

I think thus of having:

- A city table (there are 36 000 cities)
- A table of surnames (several thousand surnames)
- A table (tbQuantity) making the link between the previous two tables 
AND having a field: "counts" ("counts"=Number of persons having this 
surname in a city)

- A binary link 1:M between the table "quantity" and the table "name"
- A binary link 1:M between the table "quantity" and the table "city"

I think that it is necessary to make the third table (quantity) because 
of this field "counts".

It is not maybe a good structure to use the API methods, but in that 
case, can we better make?

Apparently, the best solution here are join them and SQL?

thank you

olivier



More information about the Valentina-beta mailing list