Database Application Planning

I am in the planning phase of a database application for personal use. I have a good layout of the database structure, but since I think about how I am going to write the program, I was wondering if I am doing this in the correct order.

Why should I plan first, db structure or classes?

+4
source share
5 answers

I think that creating your data model first is a very good idea.

If an application should be database-based, it is a good idea to have a clear idea of ​​what your data model will look like before even trying to write some code.

You can still conceptualize how you think classes can look like your thoughts on your data model. Keeping this deep in your mind when you define your requirements will help when you start writing code.

Of course, when you start writing code, you probably have to rethink the data structure, so this is an iterative process, but good planning at the beginning of the project is a good idea.

+6
source

I think you will get an excellent response from centralized data-oriented users. Personally, I always start with the data, but the programmer will probably start with the classes.

In fact, I think you need to work on two at the same time.

+3
source

They most often develop together, although it is often easiest to start developing the basic structure of the database, and then move on to the code. You will find that depending on the size of your application, the database will often change along the way to the final product.

+1
source

I usually plan as best as possible, then I start creating a database of planning / design specifications that I wrote for myself.

Then I use something like Linq-To-SQL to generate some DAL base classes - wrap them in a repository class that handles most CRUD situations.

Depending on the complexity of the application, I then write a graphical interface that directly uses the repository (fast / dirty), or I write a domain logic class (and possibly data transfer objects or dumb POCOs) that terminates the repository.

Obviously, better planning skips things, so make sure you take over the account, that you will need to go back and add fields, change types, add relationships, etc.

+1
source

If the goal of your system is to store, retrieve and present data, I would say that in any case it is advisable to first create a database.

If, on the other hand, the goal of the system is to implement a business process or processes using software, then it will often be more efficient to develop a “domain model” by first modeling the business process into objects / classes and then determining how to transfer them to / from the database later.

+1
source

Source: https://habr.com/ru/post/1309707/


All Articles