Do People Use Naming Conventions in SQL Programming?
In this paper, we investigate the usage of naming conventions in SQL programming. To this end, we define a reference style, consisting of naming conventions that have been proposed in the literature. Then, we perform an empirical study that involves the database schemas of 21 open source projects. In our study, we evaluate the adherence of the names that are used in the schemas to the reference style. Moreover, we study how the adherence of the names to the reference style evolves, during the lifetime of the schemas. Our study reveals that many conventions are followed in all schemas. The adherence to these conventions is typically stable, during the lifetime of the schemas. However, there are also conventions that are partially followed, or even not followed. Over time, the adherence of the schemas to these conventions may improve, decay or remain stable.
KeywordsNaming conventions Coding styles SQL programming
We would like to thank the anonymous reviewers for their useful suggestions and comments.
- 1.Allamanis, M., Barr, E.T., Bird, C., Sutton, C.A.: Learning natural coding conventions. In: Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering (FSE), pp. 281–293 (2014)Google Scholar
- 2.Allamanis, M., Barr, E.T., Bird, C., Sutton, C.A.: Suggesting accurate method and class names. In: Proceedings of the Joint 23rd ACM SIGSOFT Symposium on the Foundations of Software Engineering and 15th European Software Engineering Conference (FSE/ESEC), pp. 38–49 (2015)Google Scholar
- 4.Avidan, E., Feitelson, D.G.: Effects of variable names on comprehension an empirical study. In: Proceedings of the 25th International Conference on Program Comprehension (ICPC), pp. 55–65 (2017)Google Scholar
- 5.Beniamini, G., Gingichashvili, S., Klein-Orbach, A., Feitelson, D.G.: Meaningful identifier names: the case of single-letter variables. In: Proceedings of the 25th International Conference on Program Comprehension (ICPC), pp. 45–54 (2017)Google Scholar
- 7.Butler, S.: Mining Java class identifier naming conventions. In: Proceedings of the 34th IEEE-ACM-SIGSOFT International Conference on Software Engineering (ICSE), pp. 1641–1643 (2012)Google Scholar
- 8.Butler, S., Wermelinger, M., Yu, Y.: A survey of the forms of Java reference names. In: Proceedings of the 23rd IEEE International Conference on Program Comprehension, (ICPC), pp. 196–206 (2015)Google Scholar
- 11.Holywell, S.: SQL Style Guide. www.sqlstyle.guide
- 12.Kashiwabara, Y., Onizuka, Y., Ishio, T., Hayase, Y., Yamamoto, T., Inoue, K.: Recommending verbs for rename method using association rule mining. In: Proceedings of the 21st IEEE International Conference on Software Analysis, Evolution, and Reengineering (SANER), pp. 323–327 (2014)Google Scholar
- 13.Lawrie, D., Morrell, C., Feild, H., Binkley, D.: What’s in a Name? A study of identifiers. In: Proceedings of the 14th IEEE International Conference on Program Comprehension (ICPC), pp. 3–12 (2006)Google Scholar
- 14.Martin, R.C.: Clean Code - A Handbook of Agile Software Craftsmanship. Prentice Hall, Upper Saddle River (2009)Google Scholar
- 16.Swidan, A., Serebrenik, A., Hermans, F.: How do scratch programmers name variables and procedures? In: 17th IEEE International Working Conference on Source Code Analysis and Manipulation (SCAM), pp. 51–60 (2017)Google Scholar