in most cases there are some values never changed in our database e.g. for an application education,career level,job type etc these are almost non-changed once define.
so for the sake of db size is it feasilbe to make some functions in our application that will return these values then we bind them with the data sources or
is it a good approach to define tables fill records in them manually or by application then fetching them from db.
what approach is more good in terms of application performance
Jithu ThomasPosted Jan 20, 2024, 4:56 AM
Yes @ Sam Hobbs
Sam HobbsPosted Jan 20, 2024, 4:54 AM
To continue with what Jithu Thomas said, it is possible to include files in the executable file, as a resource. This is good for small files. As has been said, it is inconvenient to change that data since the application must be rebuilt. The building is quick but the deployment and paperwork necessary for the change might make it a bad choice.
The data must be stored somewhere, either the database or someplace else.
Jithu ThomasPosted Jan 19, 2024, 8:06 PM
Creating functions in your application to return predefined values and storing them in database tables—have their own merits and considerations. The best approach depends on your specific use case, requirements, and the nature of the data.
Using Functions in the Application:
Storing Data in Database Tables:
Considerations:
Hybrid Approach: In some cases, a hybrid approach may be suitable. You can store the data in the database tables but implement caching mechanisms in your application to reduce the frequency of database queries. This way, you can benefit from the flexibility of a database while minimizing the impact on performance.
Ultimately, the choice depends on the specific requirements, scale, and nature of your application. It's recommended to analyze the trade-offs and choose an approach that aligns with your application's needs.