php - How to store multiple sets of values in a database? -


I'm creating a web-app for which more than one set of data (a URL, title, and date) Can be stored in DB. For example, User1 can be stored in item 1, in which the example, http://example.com, and YY-MM-DD HH: MM: SS . And it can have several items with the same type of data.

Earlier, I was absorbing all the things in one area of ​​my user table like this:

  example = & gt; Http: //example.com=> YY-MM-DD HH: MM: SS [END] Example 2 = & gt; Http: //example2.com=> YY-MM-DD HH: MM: SS [END] etc ...  

This will be added for a large string, and then in PHP I separate each string from separator [END] and then separate each string by separator = & gt; Now I am thinking that it would be better to store these items in their table, so each user should have an 'item' table (user 1_titles, user2_item, etc.). Is there a 'right' way to do this? Will using different tables overkill? Also, how much space on my web-host, if any, will I lose?

If any further detail is required, please let me know!

Each user has a user table with information with a unique user ID

There is a data table where each piece of information (URL, title, date) is a separate column, add an additional column called User_id, which states which information this user belongs to.


Comments