Which will an arduino uno choose between 5v Vin and an external power source?

Hi, I'm no whizz kid so please don't blind me with science :wink:

I'm fine tuning a custom car project and I'm looking into ways of powering my Uno without draining the cars battery when I'm not driving it...

I understand that if a USB cable is plugged in along with a source into Vin pin, the board will choose to draw the power from the Vin pin? But what if I have an external power source and also a source into the Vin pin? Which will the board choose or will it just destroy the board?

To explain what I am trying to do so it makes sense and maybe someone can suggest a solution... The Uno is being used as a means of keyless entry into the car so it's always on along with a bluetooth shield awaiting communication from my bluetooth device. If the car isn't driven for a week or so this drains the cars battery so not only can I not easily get in the car but it also won't start... So I'm looking into putting a rechargeable battery shield in with the project so that it has a 5v source separate from the car and have the external power switched on the ignition so that when I'm driving the cars battery takes over to run the uno allowing the rechargeable battery shield to be charged by the car...

This also means when the shield rus out of power the car will still start. I have a plan to have a discreet connector that I can power the uno from outside the car if the shield battery is empty.

Am I barking up the wrong tree and is any of the above possible or even sensible?

Definitely barking up wrong tree.

Your car has upward of a 30 Amp-hour battery.

If you want a second battery to run the Arduino for the same time it would take to drain the car battery, you would therefore need at least a 20 Amp-hour battery, basically the same size as the car battery. Did you not figure that out?

So Done a bit more research but I still need the original question answering please regarding how the uno treats the Vin pin and the 5v Source supply?

Oh and as for the car battery which is a 40ah battery. The arduino uno with it's shields and relay boards is drawing around 110 milliamps. If I hook up and check the current drain at the battery there is a further 10 milliamps being drawn by the stereo. So that's 120 milliamps.. Which when you do the maths apparently comes to a battery life of 333.3hrs recurring or approximately 14 days... So If I don't drive the car for 2 weeks the main battery goes flat! But If I'm only draining a small rechargeable battery then when that goes flat I can still drive the car and I can use an auxiliary plug and play battery to gain me access to the car....

So with that now covered in great detail please can someone help me with the main question about how the arduino uno looks at the various power inputs...