Diabetes mellitus type 1 factors include having a family member with the condition. The underlying mechanism involves an autoimmune destruction of the insulin-producing beta cells in the pancreas. Diabetes is diagnosed by testing the level of sugar or glycated hemoglobin (HbA1C) in the blood. Type 1 diabetes can be distinguished from type 2 by testing for the presence of autoantibodies. There is no known way to prevent type 1 diabetes. Treatment with insulin is required for survival. Insulin therapy is usually given by injection just under the skin but can also be delivered by an insulin pump. A diabetic diet and exercise are important
Diabetes mellitus type 2 increasing age, female gender, and genetics. A lack of sleep has been linked to type 2 diabetes. This is believed to act through its effect on metabolism. The nutritional status of a mother during fetal development may also play a role, with one proposed mechanism being that of DNA methylation. The intestinal bacteria "Prevotella copri" and "Bacteroides vulgatus" have been connected with type 2 diabetes. Lifestyle factors are important to the development of type 2 diabetes, including obesity and being overweight (defined by a body mass index of greater than 25), lack of physical activity, poor diet, stress, and urbanization.