Search Results

Search found 2 results on 1 pages for 'jonarch'.

Page 1/1 | 1 

  • How to make schema and code dynamic?

    - by Jonarch
    I want to make my database schema and application code as dynamic as possible to handle "unknown" use cases and changes. Developing in PHP and MySQL. Twice now I have had to change my entire schema including table and column names and this means the developers have to go back to the application code and modify all the SQL queries and table/columns names. So to prevent this I want to if just like we do on pages where we have page content, title bar etc dynamic like a %variable%, can we do it for the schema and maybe even for the php code functions and classes somehow? It takes weeks to re-do all changes like this vs if it is dynamic it can be done in under a day.

    Read the article

  • FKs on all tables for status colunm

    - by Jonarch
    I have a colunm "Status" in every table in my DB. The purpose of it is to show if the given row is in use or if it has been deactivated. So values can be (0=deactive and 1= active). Two ways I see this: I can have enums or I am thinking if it is better to keep this colunm as a FK which references the main system data dictionary table which has all the codes used on the system. (website) The benefit is every table, every row can then be centralized through this FK. So if i ever want to check all rows which are deactive on my system i can from this table as all th child tables will have like status = ID 233, where 233 = deactive in the data dictionary table. Any benefit or should i stick with the old way of enums?. Also I am thinking if i need one more status for deleted or is that same as deactivated?

    Read the article

1