Re: Tables cities and table user
From: Luuk <luuk_at_invalid.lan>
Date: Sat, 9 Feb 2019 11:00:38 +0100
Message-ID: <5c5ea492$0$22360$e4fe514c_at_news.xs4all.nl>
>
> I didn't understand what happen in the cities table when you use the
> union all command...
>
>
> Because I think to store all cities from more or less ten countries or
> the entire world it's too heavy to to it just in one table!
>
> ^Bart
>
Date: Sat, 9 Feb 2019 11:00:38 +0100
Message-ID: <5c5ea492$0$22360$e4fe514c_at_news.xs4all.nl>
On 9-2-2019 10:50, ^Bart wrote:
>> SELECT id_city,name,'IT' from cities_it >> union all >> SELECT id_city,name,'UK' from cities_uk
>
> I didn't understand what happen in the cities table when you use the
> union all command...
>
>> or, even better (before someone else askes this question): >> Why do you have mulitple tables with city names?
>
> Because I think to store all cities from more or less ten countries or
> the entire world it's too heavy to to it just in one table!
>
> ^Bart
>
How many cities do you think can be stored in one table?
The example 'world'-database has 4079 (which is a few...) (https://dev.mysql.com/doc/world-setup/en/)
Als, why do you think the maximum value of a bigint is 2^64-1 (see: https://dev.mysql.com/doc/refman/5.5/en/integer-types.html)
If you use a bigint for your id, than you can store 2^64-1 cities in that table (if you have enough diskspace...) Received on Sat Feb 09 2019 - 11:00:38 CET