Abstract
We investigated the quality of database conceptual schemas of PostgreSQL databases of four existing programs, three of which were open source. We automated the process with a set of system catalog-based queries that we have also published (https://github.com/erki77/database-design-queries). We presented 31 SQL database design problems about the data types, field sizes, and default values of base tables as well as sequence generators and the structure of base tables. All these problems appeared at least once in at least one of the databases. Most of the problems (55%; 17) were not mentioned in the reviewed literature. We explained different signs that these problems exist in a database. We explained how to detect the occurrences of the problems by using queries. System catalog-based queries can be efficiently used to continuously check the database design and thus reduce the delay in finding the problems and fixing these.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsReferences
Foidl, H., Felderer, M., Biffl, S.: Technical debt in data-intensive software systems. In: 45th Euromicro Conference on Software Engineering and Advanced Applications, pp. 338–341. IEEE (2019). https://doi.org/10.1109/SEAA.2019.00058
Eessaar, E.: Automating detection of occurrences of PostgreSQL database design problems. In: Robal, T., Haav, H.-M., Penjam, J., Matulevičius, R. (eds.) DB&IS 2020. CCIS, vol. 1243, pp. 176–189. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-57672-1_14
Eessaar, E.: The usage of declarative integrity constraints in the SQL databases of some existing software. In: Silhavy, R. (ed.) CSOC 2021. LNNS, vol. 230, pp. 375–390. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-77442-4_33
Date, C.J.: An Introduction to Database Systems, 8th edn. Pearson, Addison Wesley, Boston (2003)
Karwin, B.: SQL Antipatterns. Avoiding the Pitfalls of Database Programming. The Pragmatic Bookshelf (2010)
Blaha, M.: A retrospective on industrial database reverse engineering projects - part 2. In: Eighth Working Conference on Reverse Engineering, pp. 147–153. IEEE (2001). https://doi.org/10.1109/WCRE.2001.957818
Blaha, M.R., Premerlani, W.J.: Observed idiosyncracies of relational database designs. In: 2nd Working Conference on Reverse Engineering, pp. 116–125. IEEE (1995). https://doi.org/10.1109/WCRE.1995.514700
Al-Barak, M., Bahsoon, R.: Database design debts through examining schema evolution. In: 8th International Workshop on Managing Technical Debt, pp. 17–23. IEEE (2016). https://doi.org/10.1109/MTD.2016.9
Delplanque, J., Etien, A., Auverlot, O., Mens, T., Anquetil, N., Ducasse, S.: CodeCritics applied to database schema: Challenges and first results. In: 24th International Conference on Software Analysis, Evolution and Reengineering, pp. 432–436. IEEE (2017). https://doi.org/10.1109/SANER.2017.7884648
Sharma, T., Fragkoulis, M., Rizou, S., Bruntink, M. and Spinellis, D.: Smelly relations: measuring and understanding database schema quality. In: 40th International Conference on Software Engineering: Software Engineering in Practice, pp. 55–64. ACM (2018). https://doi.org/10.1145/3183519.3183529
Dintyala, P., Narechania, A., Arulraj, J.: SQLCheck: automated detection and diagnosis of SQL anti-patterns. In: 2020 ACM SIGMOD International Conference on Management of Data, pp. 2331–2345 (2020). https://doi.org/10.1145/3318464.3389754
Factor, P.: SQL Code Smells. Redgate. http://assets.red-gate.com/community/books/sql-code-smells.pdf. Accessed 29 Dec 2019
Balogh, G., Gergely, T., Beszédes, Á., Szarka, A., Fábián, Z.: Capturing expert knowledge to guide data flow and structure analysis of large corporate databases. Acta Polytech. Hungar. 16(4), 7–26 (2019)
FusionForge. https://github.com/fusionforge/fusionforge. Accessed 26 Oct 2020
LedgerSMB. https://github.com/ledgersmb/LedgerSMB. Accessed 26 Nov 2020
OTRS/otrs. https://github.com/OTRS/otrs/tree/rel-6_0. Accessed 04 Nov 2020
Stansoft. http://www.stansoft.org/download.html. Accessed 21 Nov 2020
Sein, M.K., Henfridsson, O., Purao, S., Rossi, M., Lindgren, R.: Action design research. MIS Quart. 35, 37–56 (2011). https://doi.org/10.2307/23043488
McDonald, K., Matts, C.: The Seven Information Smells of Domain Modelling, InfoQ (2013). https://www.infoq.com/articles/seven-modelling-smells/. Accessed 17 Mar 2022
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Eessaar, E. (2022). On the Design of Base Tables in the SQL Databases of Some Existing Software. In: Silhavy, R. (eds) Software Engineering Perspectives in Systems. CSOC 2022. Lecture Notes in Networks and Systems, vol 501. Springer, Cham. https://doi.org/10.1007/978-3-031-09070-7_26
Download citation
DOI: https://doi.org/10.1007/978-3-031-09070-7_26
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-09069-1
Online ISBN: 978-3-031-09070-7
eBook Packages: Intelligent Technologies and RoboticsIntelligent Technologies and Robotics (R0)