Automated grading systems can save a lot of time when carrying out grading of software exercises. In this paper we present our ongoing work on a generic model for generating software correctness levels. These correctness levels enable partial grading of students' software exercises. The generic model can be used as a foundation for building SQL grading systems that check for correctness of SQL queries and can be generalized to different programming languages.