473,379 Members | 1,337 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Do multivalued fields in baseball card database go against normalization?

43 32bit
I am creating a sports card database and actually have another thread on this site about my database already but thought I should start a new thread since this is a different question.

I have determined that each sports card I own will have it's own record in a CardsTBL with fields pulling information from other normalized tables including a PlayersTBL.

My question comes as I realize some cards will have 2-4 players on the card, and team cards that show an entire team could have 9-22 players on the card face.

I still need to figure out how to set up a multivalued field but wanted to ask beforehand if this is an appropriate way to accommodate a Players field in the CardsTBL? Will I run in to issues down the road? Is it against rules of normalization?

It doesn't feel right to me to have a multi-valued field for some reason but can't think of another way to accommodate multiplayer cards.

Appreciate any feedback as I am still very new to this!
Jun 1 '19 #1
7 2706
NeoPa
32,556 Expert Mod 16PB
I can't say I have much experience directly with MVFs Chris, but the rumble is that they're best left alone if you want to avoid extra problems.

Generally speaking it's 'better' to link multiple records in using a linking table rather than having a set number of FK links in the same record. I believe we covered use of FKs in a previous thread (Transaction table to update stock table?).

Linking Tables
Such tables allow links to be establised between differing tables (Again in more complicated scenarios also between multiple records in the same table but we'll ignore that for now). A Transaction table could be considered to be such a table. Keeping it very simple we can assume a Transaction links an item with a buyer. A Transaction record would have a link to both tables in the record as well as possibly other data. There could be multiple transactions for the same pair of items - say if a buyer buys the same item two weeks in a row. There is no limit on what can be linked.

All that said, this gives you enormous flexibility to handle links between items but it can make queries harder to maintain as updatable (Reasons for a Query to be Non-Updatable) so care is often needed on that score.
Jun 2 '19 #2
zmbd
5,501 Expert Mod 4TB
IMHO Avoid the multivalue field
They are difficult to query etc... etc... etc... there are a few threads here on Bytes.com and other sites that discuss the evils of these fields.

What these fields do is hide the normalization of the data in system tables.

The team cards do create a bit of a kink in your database from https://bytes.com/topic/access/answe...le#post3819211
You may need to normalize tblCards further by pulling the player field and team field from that table and create another join table so that
[pk_JoinCardPlayerTeam][FK_tblCards][FK_tblPlayer][FK_Teams]
(PK = Primary Key, FK = Foreign key)
You should have a compound key on the three [FK_*] so that that you can't duplicate entries.
(Yes, you could use the compound key as a natural primary key; however, when writing queries and code I find them to be a bit of a pain to use)

The queries and forms would have to be updated to account for the new table
Jun 2 '19 #3
cmo187265
43 32bit
Thank you both for your replies and unfortunately confirming what I already suspected with MVFs.

Neopa: I appreciate the refresher on linked tables and admittedly will need to understand better. I wanted to have a better understanding of my specific problems before proceeding further down that rabit hole.

zmbd: I am afraid I need to chew on your suggestion a bit because I am slow to grasp this stuff. I will re-read several times and perform additional searches on what I don't understand.

It seems based on a previous post that you had some knowledge of the baseball card hobby. I just want to make sure your suggestion above was made with you understanding my dilemma with team cards, yes?

Dilemma:
I may have a collector who is looking for Randy Johnson cards and another looking for Ken Griffey Jr. cards. I would need for a Mariners team card (one record) with both players to be available in a search under either/both player names Griffey and Johnson.

I have no forms or queries built...just painfully planning tables lol.
Jun 3 '19 #4
NeoPa
32,556 Expert Mod 16PB
CMO187265:
NeoPa: I appreciate the refresher on linked tables and ...
Perhaps I should have chosen a different term. Be very careful of confusing such link-tables with linked tables. The latter are tables used in Access that link to data stored elsewhere (Such as other Access tables or SQL Server; Oracle; etc).

If you need further help then feel free to post another question. You're doing very well so far keeping your questions separate and explaining them fully. Top marks.
Jun 3 '19 #5
cmo187265
43 32bit
Neopa: when you say link-tables or linking tables, are you talking about what is also called joins where I would need to understand how inner and outer joins work and create a join table that joins two tables with many-to-many relationships (in my case)? Thanks for your help. Still working on this.
Oct 15 '19 #6
NeoPa
32,556 Expert Mod 16PB
Hi again.

I'm not sure you could say linking tables are synonymous with JOINs but they're certainly related.

It's possible (and most common after all) to use JOINs between tables without a linking table anywhere in the structure. However, when linking tables are used they certainly link using JOINs. Typically these are set up as Relationships, which causes Access to create JOINs automatically between any two tables whenever they appear in a Query.

Let me (hopefully) clarify :
A linking table is one that allows links to be defined between two other tables in a many-to-many relationship. Each record defines one related pair.

Consider people on the one side and buildings they frequent on the other. A table of people is fine. A separate table of buildings is also fine. Now you need a way of saying which people frequent which buildings. A typical family will have a home, but also a place of work for one or both parents and possibly schools for the children.

A Field in the People table won't be adequate because most frequent >1 building. That's even more extreme the other way round. A building would need to handle tens or more people. This is where the linking table comes in. Each record has a single Field to indicate a person and a separate single Field to indicate a building. Thus each and all can be matched accurately.
Oct 16 '19 #7
cmo187265
43 32bit
I have created two table design plans in attempt to solve my dilemma as stated above. The 1st didn't seem to work for me or I couldn't figure it out.

Attempt 1:
CardTBL
CardID-autonumber (PK)

TeamTBL
TeamID-auto (PK)

PlayerTBL
PlayerID-auto (PK)

CardPlayerTBL
CardPlayerID-auto (PK)
CardID (FK)
Player (FK)

CardTeamTBL
CardTeamID-auto (PK)
CardID (FK)
TeamID (FK)

Attempt 2: (see attached image)
I followed zmbd's suggestion and can see that I am able to "link" all of the tables to accommodate 1 card with multiple players, 1 player with multiple cards, 1 player with multiple teams, 1 card with multiple players and multiple teams, etc through these subdatasheets access inserted. Before I start a new question on subdatasheets I want to ask if the image attached is conceptually correct? Will it cause me issues in the future?

Thank you all for your help.
Attached Images
File Type: jpg JoinTable (Card,Player,Team).jpg (57.5 KB, 78 views)
Dec 23 '19 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Alan | last post by:
Hi, I'm converting a database application from Access 97 to C#/SQL Server. Old database contains some images in OLE fields. I've figured out that there's OLE header preceeding actual image data...
0
by: arcdolphin | last post by:
Hi, I am a new user to Access 2000 and I am looking at developing an High School Report Card Database for the school I work at, using Access 2000. Does anyone know of any databases written for...
1
by: reidarT | last post by:
I have Access databases located on several offices. Ever day or once a week they need to add records from a table to a sql-database on the internet. I am not sure how to do this upload. 1. I can...
5
by: Phaelle | last post by:
In my database, some fields are empty for some recordings. And I wouldl like that the empty fields donīt appear on the answer page of my search engine or, in other worlds, that I donīt have that...
4
by: Wayne | last post by:
I've been asked to construct a database which will require several memo fields. This database will be the standard frontend/backend mdb configuration. I have read many posts describing the...
13
by: hedges98 | last post by:
Hello I have a letter template in Word that has some blanks. I want to populate these blank spaces with fields from the database. These blanks are: client name client address appointment date...
2
by: Medaron | last post by:
I am trying to wite a vba code to read all my outlook task fields in Access database. So far I have following code: Sub OutlookTasks() Dim ol As Object Dim olns As Object Dim objFolder As...
1
by: vonn | last post by:
There are 4 fields in my database(exlcuding the primary key)...only 3 fields can be successfully updated. the "Section" field returns an error pointing to da.Update(ds, "moreforengineers")? the...
7
by: ajaxbegins | last post by:
What I need is, when the user fills his username and does one of the following: 1.presses tab 2.Presses enter 3.clicks on a fetch button(fetch button does not exist now,i would like to know how to...
5
by: yuanmiguel | last post by:
Hi, I want to know if there is a way to edit a multivalued field? please teach me how thanks PLEASE SEE ATTACH SAMPLE FILE
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.