Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

Can databases handle what I want to do?

Jul 1, 2007 6:06AM PDT

Hi, there's something I would like to keep track of, and my first thought was to make a database for it in Access (I used Access in conjunction with SQL to keep track of euchre stats a while back, so I'm rather familiar with database basics).

One table I'll be keeping track of will be session reports of various board games, and one item I'd like to keep track of is the players who played in that game. So, every game will have at least two players, but beyond that I don't know how many will play (euchre was easier; there were always four players).

Enough backstory; my question is, can databases (specifically, RDBS) handle lists as entries? That is, can one column in the table be called "players", and each entry has a list of entries from a "Player" table? Otherwise, can you suggest a better method of handling this data?

I took a course on RDBS in University, but I have no reason to believe that databases can do such a thing.

Discussion is locked

- Collapse -
That's classic.
Jul 1, 2007 9:43PM PDT

In fact, it's only the first normal form: no repeating groups in an RDBS. Those need to be 'normalized away' to a separate table. And that, of course, has a foreign key referencing the entity it belongs to in the first table.

Another way to look at the same facts: it's a n:n-relationship between player and game. And n:n-relationships in a data model are represented by two 1:n-relationships in the relational model.

This is rather basic stuff. I expect a University course in relational database modelling to treat BCNF at least, and maybe even 4NF and 5NF. But that's a quite different story.

Hope this helps.


Kees

- Collapse -
BCNF? Sounds familiar...
Jul 2, 2007 4:25AM PDT

Yeah, the course I took did indeed cover BCNF. There's a big difference between what I was taught, and what I can remember today, though. If you don't use it, you lose it, as they say, so maybe in the future if I need to design a database, I'll remember to keep normal forms in mind.

This still doesn't help me though; are you saying that this type of information is not suited to a database? The next best thing I can think of is to create a table that lists all the combinations of players, but then such a table is exponential in the number of players. Any advice?

- Collapse -
I tried to say ...
Jul 2, 2007 5:05AM PDT

it definitely can be done. In fact, it's standard, seen from both ways I outlined (the repeating group point-of-view and the n:n-relationship-becoming-a-table-in-between point of view).

Maybe brush up your knowledge of data modelling?

Kees