explaining a random ERD
Hi, Emmanuel here. So first off, I know nothing about fantasy football, or much about football for that matter, so I'm going to write my honest take on this model. This will also be me writing in my own style, so I'll exercise some of the writing skills I have been practicing since the start of this year. So brace yourself, and I apologize in advance for the fact that you have to sit there and take valuable time off your day to read my wannabe New York Times bestseller jabbering and ramblings. Let's begin.
In general, we have what's called an ERD, an entity-relationship diagram, if I picked up anything from undergrad times. The model consists of 10 entities: League, Owner, Fantasy Team, Player, Position, NFL Team, Fantasy Game, NFL Game, Relevant Play, and Play Type. They are all connected to each other one way or another; we shall try to get into those connections as we go along.
Let's start with the Player, who plays a position captured in the Position table. For the Player, we shall capture their name and service years, among other things, I'm guessing. But those two will be key. The Position table captures the Name and Description of said player. So I'm thinking it's descriptions like Quarterback, Center, Tight End, or something like that. I could be wrong; we'll find out.
The player also plays on an NFL team. By the way, do you play on a team or in a team?
This is probably one of those American vs. British English things, isn't it?.
Fascinating how a fuss over some tea 250 years ago now means players like Osi Umenyiora, Jack Crawford, and Lawrence Tynes are forever doomed to wonder whether they're in or on their teams. I guess that's what happens when you cross the pond to play American football. You're not just tackling opponents – you're tackling prepositions too! The poor lads.
The NFL team details captured are Name and City, which I'm also thinking captures extra things because a city can have more than one NFL team named the same thing, even more so if you consider a time aspect. Since the dawn of time, think how many teams are named or have been named the Eagles or Lions or Bears.
Back to our Player: that same Player has a Relevant Play. The Relevant Play captures total points, which are associated with a Play Type. The Play Type is captured by name, points, and description. Which is likely something like tackle, fumble, or catch. I don't know. In fact, I still know nothing about American Football, a sport where you play with a ball using your...? That's right, ladies and gents, your hands.
That Relevant Play, of course, has to occur in a game, captured in the NFL Game table. The NFL Game table captures the game date, which is explicitly shown as an attribute.
. We also see relationships that imply additional information. It has home team and away team relationships with NFL Team, and it's related to Relevant Play, suggesting it tracks plays that occur in the game.
Just now realizing I have successfully, yet unintentionally, covered only the left side of the ERD. Let's move on to the right side of the ERD. My right, no your left, oh sorry, your right. No, your other right. No your oth... Ahh, forget it. Let's move on to the other side of the ERD that doesn't have all the NFL tables.
So we'll start with a Fantasy Team. Why? Because the homework mentioned the word fantasy in it, so I'm guessing it's a big deal. Don't judge me.
Team can have a name and an icon, though I'm not sure what "icon" means here. Is it an image icon, or like Elvis or Michael Jackson icon icon? I mean, it's a valid question if you think about it.
The Fantasy Team plays in a Fantasy Game... or is it on a game?
Forget healthcare and unemployment rates; these are the real issues presidential debates should be tackling! The American people demand answers, and we want them now!
Next debate question: 'Mr. President, in your administration, will NFL teams be playing in games or on games? And how will this impact our national security?'
Breaking news: Polls show 68% of voters are 'deeply concerned' about preposition usage in sports. The other 32% are still trying to figure out why we park on driveways and drive on parkways.
The game is captured by the Fantasy Game table, which details the game date as what I'm guessing is the defining key. The Fantasy Game also gets Total points from the Relevant Play table.
The relation between team and game is captured by the two relationships, a many-to-many relationship by the way, which implies that for each Fantasy Game: One Fantasy Team acts as the home team, another Fantasy Team acts as the away team.
In addition, each Fantasy Game involves exactly two Fantasy Teams.
A Fantasy Team can participate in multiple Fantasy Games, sometimes as home team, sometimes as away team. Which makes sense, but imagine how much more interesting Rugby, I mean Football, would be if we had like 3 teams playing in one game. At the same time. Confusing yes, but interesting, and honestly more fun. Why not? The more the merrier, am I right? No? OK, I will see myself out.
There's an owner of that Fantasy Team, whose Role has to be explicitly defined as seen in the Own relationship.
So, the Owner table in our fantasy football model captures names and addresses. Makes sense, right? We need to know where you live... for 'national security reasons.'
Because let's face it, if you own a fantasy football team, you clearly have way too much time on your hands and nothing else going on in your life.
You know what? While we're at it, why don't you just jot down your phone number and email too? Just in case we need to stage an intervention or, you know, notify your next of kin when you're found buried under a mountain of draft picks and statistics sheets.
The owner participates in a league. That League-Owner relationship also captures a date joined attribute which I'm thinking can be a unique key.
But I'm not seeing any direct relation between League and Team, which intuitively feels off. The League table captures the cost, name, and URL. URL of the league? Or URL of the website where I "legally" stream the league or?
Anyway, I think that's all. This has been fun. Am still learning of better ways to end articles other than just thank you or goodnight.
Notes:
I only used AI to correct grammar and do a different take on the phone numnber email jokes and her are the other options they provided.
by chatGpt:
You know what? While we're at it, why don't you just jot down your phone number and email too? Just in case we need to contact you for some top-secret fantasy coach meetings or, you know, let your mom know why you’re still ignoring her calls—it's for the love of the game, obviously.
By claude:
You know what? While we're at it, why don't you just jot down your phone number and email too? That way, when your significant other inevitably leaves you for spending more time with your fantasy roster than with them, we can help you find a new love interest. How about that cute quarterback from your rival's team? They're single, 6'4", and their completion percentage is off the charts!"
Comments
Post a Comment