Do not buy a single large card - or even larger than necessary cards.
Risk of data loss is minimised by using more smaller cards.
If you shoot RAW and if D3100 RAW files are around 20 MB (adjust to suit actual) you'll get about 50 photos/GB ~=
400 / 8GB
800 / 16 GB
1600 / 32 GB
3200 / 64 GB
JPG will give substantially more.
In almost any setting, having to change card every 400 photos is not a major imposition.
With say 4 x 8MB cards and swapping cards 'every now and then' and using all 4 cards, you will lose about 1/4 of the photos taken since copying if a card fails.
With 1 x 32 GB or 1 x 64 GB you will lose 100% WHEN the card fails.
If you have at least 2 x 16 GB you can transfer files from one while using the other.
Similarly with 4 x 8 GB.
This could be portable hard drive with peer to peer module, netbook, tablet etc.
Nowadays some smart phones will probably allow you to use a USB card reader to backup a card to the phone's 32 GB t-Flash. The phone's memory can be slower and so cheaper per GB.
Re card speed: In most cases a 10 MB/s Class 10 from a reputable manufacturer will suffice. With 20 MB RAW files a 10 MB/s card will take 2s to write and a 45 MB/s card about 0.5s. This is if those are genuine write speeds and if the camera can support 45 MB/s. Clone cards with fake labels and cards labelled for read rather than write speeds may cause bad surprises.
If you really must shoot RAW and must have > 1 frame/s then the 45 MB/s card may help. Camera buffer size and design will set max shots before buffer stutter starts.
IF the camera allows unlimited RAW shots if there is buffer room then
Buffer fill time is ABOUT
(Buffer size in MB) / (Camera data rate - card write rate)
= (Buffer size in MB) / (File_size x frames_per_second - Card_write_rate)
eg if camera produces 4 x RAW at 20 MB each per second.
If buffer is 64 MB
If write rate is 45 MB/s
Fill time is ~= 64 MB / (80-45) = 64/35 or under 2 seconds.
Buffer size is crucial in situations where camera rate exceeds card write rate.
More normally - say you write 10 MB files, use a 10 MB/s card, shoot 4 frames/s and have a 64 MB buffer (as above)
Fill time = 64/(10 x 4 - 10) = 64/30 = slightly over 2 seconds.
But get files size down to 5 MB and things may change
Fill time = 64 / (5 x 4 - 10) = 6.4 seconds.