Most people don't understand the wording of the second amendment. First thing is a Nation or country was referred to as a "State" back then and having something in the constitution guaranteeing a military or army or navy to be "armed" would be redundant or unnecessary. Back then a lot of arms were stored in powder houses for the canons, guns, etc. So it was necessary for all people who were deemed militia, which at the time were all able bodied males and females between 16-40 years of age, to have access to the stores of arms and be able to carry arms. They didn't want a Red coat to be able to walk into any town and arrest someone for carrying a banned assault weapon at the time.
"A well regulated Militia, being necessary to the security of a free State, the right of the people to keep and bear Arms, shall not be infringed."
Now if you want more context of these times I recommend reading the Federalist papers written by the founding fathers. They specifically mention a possible loss of security to ensure our liberties.
You have to remember our country was built on blood shed. The first shots at Lexington were fired by extreme right militia at the military or government agents when they came to disarm the local populace.
Sure 17 people is a tragedy but we have over 320 million people living in the US now. I know it sounds cold hearted but we have to accept these type of losses to maintain out liberties.