I think you don't understand that a country defending itself doesn't have to be as powerful as the attacking country in order to be successful. Vietnam already demonstrated that to USA and France in the past.
In ground warfare for example, it is a typical rule that the attacking forces need to be 3 to 5 times stronger than the defending forces in order to be successful. China has a much bigger army, but it is deployed in many fronts, it can't put all is resources in just one border.
Obviously china has the most advantage in a naval and air war, but there is still a price to pay.
Vietnam is not intimidating to china, but is not a pushover either. Its up to china to decide if Vietnam has enough power of deterrence or not, but I would suggest that they don't miscalculate as the americans did.
As Ho Chi Minh once said after the french defeat: "They lost because they don't understand our history". Does china understand Vietnam's history?
Air and Sea battle is about training and equipments, both of which we have better. You can't really hit us if we out range you by 50 km. Your missile will stop before it reaches us and the fact our radar is better is also for all to see.
But that's not the point.
Let me ask you one thing, why was Vietnam colonized by the French? Because they became civilized and this a heavy price cannot be paid.
Just like now, they are no longer peasant farmers and other bums that will wait to be slaughtered.
Someone said if I understand Vietnam, I understand Vietnam too much, because you are just like Chinese, but from a smaller and weaker state.
We may have sacrificed 20 million during WW2 and then more millions in the civil war, even 300,000 thousand during Korea and thousands during 1979, but we cannot lose that many people again, anything above 500 will raise eyebrows, maybe even 500 or less.
The past can be an indication, ONLY if all the variables remain the same. It didn't.
Also Vietnam is a push over, Vietnam hasn't reform the army to fit modern warfare, I know because I follow its exercises, but China has, within 2020, China will complete major reforms, from joint chiefs, to reduced regions, better integration, to more responsibility to field officers and NCOs, and much more.
Until Vietnam is a modern army, it is easily defeated, just look at Chinese defense, I got a thread there about China's recent exercises and how newly modeled army easily defeated old, but the best equipped armies, and Vietnam isn't better equipped, not by a long shot.