One serious health condition which has made people to suffer from uncontrollable high blood sugar is diabetes. The problems of existing detection approaches are data imbalance, feature selection, and lack of generic framework for diabetes classification. In this research, developed an ontology-based diabetes classification model using naïve Bayes classifier was developed. The model is divided into five modules: data collection, feature selection, ontology construction, classification, and document query. The data collection module adapted PIMA Indian Diabetes Database to predict diabetes. The feature selection module employed multi-step approach for selecting the most important features from dataset. For automatically constructing ontology rules based on the chosen features, the ontology generation module used a decision tree classifier. Based on the user's question, the classification module employed a Nave Bayes classifier to automatically classify the built ontology as having diabetes. Based on the ontology-based nave Bayes classification, the document query module searches and returns the anticipated documents requested by users. The proposed model using a 10-fold cross validation performed better in diabetes in precision, accuracy, recall and F1-score of 96.5%, 93.55%, 79.2% and 87.0%, respectively. Benchmarking tools included K-Nearest Neighbor (KNN), Decision Tree (DT), Multilayer Perceptron (MLP), Logistic Regression (LR), Hidden Markov Model (HMM), Support Vector Machine (SVM), Naive Bayes (NB), Random Forest (RF), and Deep Convolutional Neural Network (DCNN). With an area of 0.9578 in compared to other relevant methods, the created model suggested a more accurate test. They demonstrated that the model's cost-effectiveness for predicting diabetes outweighs its value.