Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6880817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:01:30+00:00 2026-05-27T05:01:30+00:00

A while ago, I came to the realization that a way I would like

  • 0

A while ago, I came to the realization that a way I would like to hold the skills for a player in a game would be through CSV format. On the player’s stats, I made a varchar of skills that would be stored as CSV. (1,6,9,10 etc.) I made a ‘skills’ table with affiliated stats for each skill (name, effect) and when it comes time to see what skills they have, all I have to do is query that single column and use PHP’s str_getcsv() to see if a certain skill exists because it’ll be in an array.

However, my coworker suggests that a superior system is to have each skill simply be an entry into a master “skills” table that each player will use, and each skill will have an ID foreign key to the player. I just query all rows in this table, and what’s returned will be their skills!

At first I thought this wouldn’t be very good at all, but it appears the Internet disagrees. I understand that it’s less searchable – but it was not my intention to ever say, “does the player have x skill?” or “show me all players with this skill!”. At worst if I wanted such data, I’d just make a PHP report for it that would, admittedly, be slow.

But it appears as though this is really faster?! I’m having trouble finding a hard answer extending beyond “yeah it’s good and normalized”. Can Stack Overflow help me out?

Edit: Thanks, guys! I never realized how bad this was. And sorry about the dupe, but believe me, I didn’t type all of that without at least checking for dupes. 😛

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T05:01:31+00:00Added an answer on May 27, 2026 at 5:01 am

    Putting comma-separated values into a single field in a database is not just a bad idea, it is the incarnation of Satan expressed in a database model.

    It cannot represent a great many situations accurately (cases in which the value contains a comma or something else that your CSV-consuming code has trouble with), often has problems with values nested in other values, cannot be properly indexed, cannot be used in database JOINs, is difficult to dedupe, cannot have additional information added to it (number of times the skill was earned, in your case, or a skill level), cannot participate in relational integrity, cannot enforce type constraints, and so on. The list is almost endless.

    This is especially true of MySQL which has the very convenient group_concat function that makes it easy to present this data as a comma-separated string when needed while still maintaining the full functionality and speed of a normalized database.

    You gain nothing from using the comma-separate approach but lose searchability and performance. Get Satan behind thee, and normalize your data.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A while ago, I came across some code that marked a data member of
A while ago I came across this answer that introduced me to the obscure
It came to my attention a while ago that some people were posting images
A while ago I had a query that I ran quite a lot for
A while ago another question referred to the (possibly urban tale) statistic that ...
A while ago I was trying to figure out a way of doing this
A while ago, I saw on a Screencast a tool that could be ran
folks. So, I've came across this compilation error a while ago.. As there's an
I came across this presentation while browsing SO some time ago, and it relates
A while ago I came across an interesting array of video presentations on a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.