• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Databse ER Diagram question

Joined
Sep 7, 2012
Messages
171 (0.04/day)
Location
New Delhi, India
System Name Devil's Hell
Processor AMD Ryzen™ 5 2600X Processor 2nd Gen 3.6GHz
Motherboard MSI X470 GAMING PRO MAX
Cooling Corsair H60 (2018) 57.2 CFM Liquid CPU Cooler
Memory Corsair Vengeance RGB Pro 16 GB (2 x 8 GB) DDR4-3200 CL16
Video Card(s) MSI GTX 1060 Gaming X 6GB
Storage Segate 2 TB, WMD 250 GB M2
Display(s) Samsung T23B350AR
Case Cooler Master MasterBox Lite 5 RGB ATX Mid Tower
Audio Device(s) Motherboard
Power Supply Corsair TXM Gold 650 W 80+ Gold Certified Semi-modular ATX Power Supply
Mouse Logitech
Keyboard Logitech
Software Windows 10 64 Bit
So basically, I really dont have a very good understanding of DB and following question have been asked in some exam (previous year), can any one with DB knowledge help?

Create a complete Entity-Relationship (ER) diagram for a database that stores the following information
about a baseball league. You should model the Entities and their attributes, as well as the
Relationships and their constraints. Write both the minimum and maximum participation of entities in
a relationship as explained in class: for example, if a constraint states that a minimum of 2 and a
maximum of N entities can participate in the relationship, write 2:N (not just N).

 The database stores information about players, teams, and games. A player has a unique player
name. A team has a unique team name. A game has a unique game number. These are the only
entities in the database.

 A player plays for one team at any given time. The start date and end date for the player’s
assignment on the team is recorded. A team will consists of 9 or more players.

 The database keeps track of every time a player participates in a game. It also stores the player’s
performance rating (A,B,C,D,F).

 For each game, there will be one home team and one away team. The date, time, and field name
will be recorded for each game.

 For each game, the Inning Score for the home team and the away team will be stored. The Inning
Score consists of: the number of runs, hits, and errors. The Final Score of the game will be also be
stored for both the home team and the away team (runs, hits, and errors).
 

W1zzard

Administrator
Staff member
Joined
May 14, 2004
Messages
27,037 (3.71/day)
Processor Ryzen 7 5700X
Memory 48 GB
Video Card(s) RTX 4080
Storage 2x HDD RAID 1, 3x M.2 NVMe
Display(s) 30" 2560x1600 + 19" 1280x1024
Software Windows 10 64-bit
Where is the issue specifically? I'm sure you can complete like 90% of it on a piece of paper in 5 minutes
 
Joined
Sep 7, 2012
Messages
171 (0.04/day)
Location
New Delhi, India
System Name Devil's Hell
Processor AMD Ryzen™ 5 2600X Processor 2nd Gen 3.6GHz
Motherboard MSI X470 GAMING PRO MAX
Cooling Corsair H60 (2018) 57.2 CFM Liquid CPU Cooler
Memory Corsair Vengeance RGB Pro 16 GB (2 x 8 GB) DDR4-3200 CL16
Video Card(s) MSI GTX 1060 Gaming X 6GB
Storage Segate 2 TB, WMD 250 GB M2
Display(s) Samsung T23B350AR
Case Cooler Master MasterBox Lite 5 RGB ATX Mid Tower
Audio Device(s) Motherboard
Power Supply Corsair TXM Gold 650 W 80+ Gold Certified Semi-modular ATX Power Supply
Mouse Logitech
Keyboard Logitech
Software Windows 10 64 Bit
Ya I can create DB easily but I really dont have any idea about ER Diagrams :-D u knw google and learn db scripting thing.
 

W1zzard

Administrator
Staff member
Joined
May 14, 2004
Messages
27,037 (3.71/day)
Processor Ryzen 7 5700X
Memory 48 GB
Video Card(s) RTX 4080
Storage 2x HDD RAID 1, 3x M.2 NVMe
Display(s) 30" 2560x1600 + 19" 1280x1024
Software Windows 10 64-bit
They really just represent your table structure. Read up on them, they are easy, especially if you know how to work with databases already
 
Joined
Mar 24, 2017
Messages
123 (0.05/day)
Location
Italy
An assignment based on a name as a unique ideintifier is an assignment from a shitty dbs class.
Refuse to partecipate.
 
Joined
Mar 24, 2017
Messages
123 (0.05/day)
Location
Italy
on a more serious side...

this basically is Player Team ER based on the first 2 points of your assignment.
upload_2017-6-5_17-33-46.png


you can see we have Players, Teams and a third table that connects the 2 entities.
The PlayersTeams have an unique key that prevents the same player playing for the same team on the same date(but this is a wrong way to do that, it's only for educational purpose. To be honest I do not even know if there is a simple method to strengthen a relashoship on time periods)

On the connections you have a 1:many relashonship in either case, where "1" is where the key is and "Many" is where the "infinity" sign is
 
Top