First, let's see how badly the code is connected to the database, if it all mixed up without a DAO layer, you should not think about rewriting, but if there is a DAO layer, then it's time to rewrite this layer and DB along with it. If possible, make a migration tool using two DAOs.
But I assume that the DAO does not exist, so you need to find which areas of the code you are going to change, and which parts of the database, which we hope can be broken down into smaller parts that can be updated as you support. The biggest deal is to get FK there and start checking the correct indexes, there are good chances that they will not be executed correctly.
I wouldn't worry too much about naming until the rest of the db is under control. As for NULL, if the program clamps the NULL value, do not let it be NULL, but if the program can handle it, I would not worry about it at this point in the future, if it makes the default value to the database, but it’s the way down the line from the sound of things.
Do something about Varchars earlier, and then later. If something makes the first clean background fixed for the program.
Another thing is to evaluate the efforts of each area, and then add this price to the cost of new development in this section of the code. This way you can fix the details when adding new features.
source share