Data modelling: conceptual, logical and physical model
19 February 2024Speed of decision-making and data quality
19 February 2024Creating a database starts with understanding what data you need and how it will interact. We will discuss how to gather requirements and how to identify key entities and the relationships between them in the “Data Quality Requirements and Assurance” section.
In this chapter, we will move on to the technical side of things and show how you can create a simple but functional database with a minimal amount of code using SQLite in the Python programming language as an example. Relational databases were discussed in detail in the chapter " Structured relational databases and SQL query language".
SQLite is a lightweight, embeddable, cross-platform database that supports core SQL functionality. It is open source as its C source code is available without restrictions. SQLite is widely used in CAD (BIM), ERP, EPM systems and is present in almost every smartphone.
Let's ask ChatGPT to create a small SQLlite database for us based on Figure 2.5-3 for FEM (Structural Impact) and CPM (Installation Schedule) system.
❏ Text request to ChatGPT:
Write a SQLlite database creation for the "Structural Impact" and "Installation Schedule" systems from the picture in the attachment. ⏎
➤ ChatGPT Answer:
This code can be executed in any Python environment with SQLite support, which is typically included in standard Python installations. It may be run on a local machine with Python or through an online Python interpreter capable of running scripts and creating files.
Once run and executed, this code will create SQLite database named construction.db, which will include the tables "Structural Impact" and "Installation Schedule". Once created, data can be inserted into these tables, allowing for operations such as data entry, querying, and updates to commence. Data can be imported into the SQLite database from CSV files, Excel spreadsheets, APIs, web scraping, or exported from other databases.
Populating a database with data is not just an uncontrolled process of filling tables, but a process that must first and foremost depend on successfully passing quality checks. Only after the quality of the input data is confirmed can the input information be used correctly in business processes.