Functionality:
- API: An API provides a set of protocols, tools, and definitions for building and integrating software applications. It defines how software components should interact, enabling different systems to communicate. (The bridge between the frontend and the application code)
- Agile Data Centric Database: An agile database refers to a design approach that emphasizes flexibility and adaptability. It allows for iterative development, making it easier to achieve incremental improvements over time. By implementing event processing, constraints, and the necessary steps to achieve a 3rd normal form, you add agility to the database.
In a modern application, they both perform essential and separate functions. This post will focus on the functionality that they could share. They both can be used to enforce business rules. An API in a program-centric application likely encapsulates business logic from pre-GUI (Graphical User Interface). In a data-centric world, a significant amount of the business logic can be built into the database and not the API.
Flexibility:
- API: API’s provide flexibility in integrating different systems and services. They allow developers to access specific functionalities or data from one system to another..
- Agile Data Centric Database: Agile databases provide flexibility by adapting to changing business needs and requirements. Depending on the level of agility achieved, they can accommodate changes in data structures, relationships, and business rules without requiring significant redesign or disruption.
The API provides the connection between the database and the GUI. The database contains and maintains the company’s most valuable asset. (DATA)
Development Process:
- API: Developing an API involves defining endpoints, request-response formats, authentication mechanisms, and documentation. It typically follows a structured process and requires collaboration between teams responsible for building different system components.
- Agile Data Centric Database: Agile database development follows agile principles, emphasizing iterative development, continuous feedback, and collaboration between developers, business stakeholders, and database administrators. Changes are made incrementally based on evolving requirements and user feedback.
It is likely faster to develop an API than it is to renovate your database. However, speed is not the only consideration. The ongoing application maintenance should be considered along with the mounting technical debt. When you create an API with business logic included, you must maintain those rules in 2 or more places. When you associate the business rules with a file, through an event trigger program, you consolidate the business logic in one place and reduce the maintenance effort in the future.
In the long term, the database of an IBM i application will need to evolve to meet these future demands, focusing on scalability, performance, security, integration, flexibility, analytics, cloud compatibility, and high availability.
In summary, API’s and agile databases potentially have overlapping purposes. They both play important roles in building modern software systems. APIs should facilitate communication and integration between software components. Agile databases support flexible and adaptive data management, including business logic, while accommodating changing business needs. Together, they enable the development of dynamic and responsive applications that can evolve and scale over time.
For the sake of agility, it is better to make a strategic decision to enforce business rules at the database level rather than in the API, to avoid the programming redundancy and expense of doing it more than once.
Making database changes, such as adding a field or changing a field size, can be intimidating, especially during normalization. I will include an example explicitly created for one of our customers to test and implement file normalization changes safely.
https://databoroughservices.com/2023/04/27/low-risk-file-normalization-modernization/
