Database design dilema. Guids or ints?

You'll end up with a large number of duplicates - especially in common cities. Could you not pre-populate the database with city information?

Good point about the duplicates. However lets assume an algorithm is in place that prevents duplicate cities in the same nation. Also I do send out a database with as much cities as possible (over a thousand cities) – Maurice Apr 24 at 16:25 I presume this application will be running on computers without an internet connection?

If not, then you could run a simple web service to provide synchronization between the app and a 'master list' of cities. – Steve Mayne Apr 24 at 16:28.

The above is part of a database that I would want to redistribute to users of my application. The users of my application will be allowed to add their own nations and well as cities. When they add their own city, as per the current database design, it would obviously increment the City.Id primary key value.

However, I would want to at some stage, allow users the ability to 'push' or 'pull' nations/cities from each other's database. Each wants to have each other's cities in their city table. Once each has pushed their different cities data across, their City.Id, City.Name attributes won't quite correspond.

I would prefer to have the City.Id, City.Name attributes to have a similar look across all the users databases. So should I rather user guid's for the City.Id? Or does anyone know of an alternative method I can achieve this desired synchronisation.

Added "! " at the end: User. Find_by_name "a" => return nil User.

Find_by_name! "a" => raise error.

ActiveRecord::RecordNotFound when an object can't be found with a given id. I don't like starting to manage error raising. This sounds to me like an open hole to a lot of worries.

I didn't read anything about this change in the changelog.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions