Jump to content

database - add columns or new table?


steph.hope

Recommended Posts

As it says in the title, if I have additional data to save to the database, is it better / safer / more efficient to add a column to an existing table (tblorders in this case) or to create a new table with the order id and my new column, which would then have to be queried in addition to the tblorders when I want to view order data?

Link to comment
Share on other sites

  • WHMCS Technical Analyst

Hello,

It is recommended to create a new table in such scenarios so that the integrity of the stock tables (like tblorders) is not compromised by adding new columns. You can create as many new tables as per your requirements, to store additional data. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated