2

I have a function in my program using MySQL, and we have decided that a Foreign Key should reference a different table, for more accurate data.

The program works as it is now, but what I want to know is how is the best way to go about changing this, but I am unsure which site to ask this on?

Stack Overflow, Programmers, or Code Review?

EDIT: To clarify, my intention is to decide which direction I should take in correcting this. I avoided clarifying the question because I am not trying to ask the question on Meta, just where I should ask it.

I have one class that is used as the MySQL query functions (MySQL.cs). All of the queries are in one location. However, all of the references to this class are scattered throughout the rest of the program (MajEq.cs, Cable.cs, Testing.cs, etc.); and I want to know which would be the best way of attempting to handle this correction:

  1. Change the database (i.e. move the FK reference) and then change the MySQL query Class, which will effectively break the rest of the program - leaving empty fields/null references everywhere, and work through those to fix all the missing references

  2. Find all the references in the program, change those, and then fix the MySQL queries, and the database.

The program works now, and "breaking" the program is not an issue at this stage. I want to know which would be the most effective way of tackling this change might be.

2
  • 3
    Probably none of them. If you have a concrete idea of what is "best" for you in terms of metrics then make the change and measure the result. If not it's just going to be opinion-based.
    – jonrsharpe
    Commented Jun 7, 2016 at 6:35
  • In its current form, this sounds awfully like a code writing request, even though it's probably not meant that way. It'd need much more detail (and possibly a specific roadblock you're hitting) to work.
    – Pekka
    Commented Jun 7, 2016 at 8:50

1 Answer 1

3

Nobody anywhere can tell you what would be "best" if you do not provide the criteria for deciding which potential solutions are better.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .