Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
954a124
Any message
mrb1218 Sep 20, 2016
b1a1ea7
Add text document with list of entities
mgreci Sep 20, 2016
ad26179
Merge branch 'master' of https://github.com/mrb1218/team-manager-1
mgreci Sep 20, 2016
6e74ebc
Move my changes of entities.txt to the main directory
mgreci Sep 20, 2016
13907ac
Add some entities to entities.txt
mgreci Sep 21, 2016
620e418
Added more information, entities, and joint-table style solution
mgreci Sep 21, 2016
1e4c8a2
Add my initial work on the MySQL workbench design
mgreci Sep 22, 2016
f08fc9e
new sqlite workbench commit
mrb1218 Sep 22, 2016
c3f7b04
Merge branch 'master' of https://github.com/mrb1218/team-manager-1
mrb1218 Sep 22, 2016
1d38804
workbench update 3
nguyenm1 Sep 22, 2016
5c815cb
check
nguyenm1 Sep 22, 2016
bcf9a8c
Move database design V2 into the original
mgreci Sep 22, 2016
17a3701
Move database design doucments into artifacts/
mgreci Sep 22, 2016
18fccb6
New ERD
mrb1218 Sep 23, 2016
75edce5
Change birth_date as a string to three seperate integers
mgreci Sep 25, 2016
4fdac59
Add Team Management Vision document as a PDF passed out in class.
mgreci Sep 25, 2016
8cb3abc
New and clean rails project 'team-manager'
mgreci Sep 27, 2016
aface51
Add script to generate scaffolds
mgreci Sep 27, 2016
e515f65
Add games_played, wins, losses, and ties to a team for stats
mgreci Sep 27, 2016
a782fa7
Add text file with list of current issues.
mgreci Sep 27, 2016
469905a
Remove stats from teams as this will be in the next step
mgreci Sep 27, 2016
da1e6d9
Capture all 14 tables, unsure how to do join tables
mgreci Sep 27, 2016
363c6ce
Adjust so everything fits to one page
mgreci Sep 27, 2016
294c068
Merge branch 'master' of https://github.com/WebArchitectureExperts/te…
mrb1218 Sep 27, 2016
0a7b435
Update issues.txt
mgreci Sep 27, 2016
68c6811
Mention how join tables will be created.
mgreci Sep 27, 2016
811d00a
Merge branch 'master' of https://github.com/mrb1218/team-manager-1
mgreci Sep 27, 2016
b08050e
Merge branch 'master' of https://github.com/WebArchitectureExperts/te…
mrb1218 Sep 27, 2016
2dda886
Delete basic app folder
mgreci Sep 27, 2016
6465d88
Update issues based on in class feedback
mgreci Sep 27, 2016
f5cb1b0
Merge branch 'master' of https://github.com/mrb1218/team-manager-1
mrb1218 Sep 27, 2016
f6ffc45
Edit generate_tables to work in new structure, move issues.txt into a…
mgreci Sep 29, 2016
54146f2
Merge branch 'master' of https://github.com/WebArchitectureExperts/te…
mrb1218 Sep 29, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added artifacts/Team Management Vision.pdf
Binary file not shown.
Binary file added artifacts/Team_Manager_App_Database_Design.mwb
Binary file not shown.
149 changes: 149 additions & 0 deletions artifacts/entities.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
# Place all entities in (as a list) this document
# Try to make the names descriptive
# One indent indicates attributes to that entity


# I came to the conclusion that the best way to represent an entity having multple references to an object (i.e. the many-to-many relationship: a team has multiple players) is to use joint-tables.
# To use this, we do not list the reference in the entity and instead make another table that will hold the entity id and the id of objects being reference
# See below for what I mean

# The structure of where Orgs and Leagues is not yet determined but either way both need to be included

Organization
organization_id : int
name : string

(Joint-Table) Organizations-Leagues
organization_id : int
league_id : int
#Depending, we may use this joint table instead:
(Joint-Table) Organizations-Teams
organization_id : int
team_id : int

League
league_id : int
name : string

(Joint-Table) Leagues-Organizations
league_id : int
organization_id : int
#Depending, we may use this joint table instead:
(Joint-Table) Leagues-Teams
league_id : int
team_id : int

Teams
team_id : int
name : string
color : string
mascot : string
wins : int
losses : int
ties : int
roster? #Not sure how to represent that

(Joint-Table) Teams-Player
team_id : int
player_id :int

(Joint-Table) Teams-Managers
team_id : int
manager_id : int

(Joint-Table) Teams-Coaches
team_id : int
coach_id : int

(Joint-Table) Teams-Parents
team_id : int
parent_id : int

People
person_id : int
first_name : string
last_name : string

(Joint Table) People-Addresses
person_id : int
address_id : int

(Joint Table) People-Emails
person_id : int
email_id : int

(Joint Table) People-Phones
person_id : int
phones_id : int

Addresses
address_id : int
street1 : string
street2 : string
city : string
state : string
zip : int

Phones
phone_id : int
number : string

Emails
email_id : int
email : string

Managers
manager_id : int
person_id : int
team_id : int
organization_id : int
league_id : int

Coaches
coach_id : int
person_id : int
team_id : int

Players
player_id : int
person_id : int

Parents
parent_id : int
person_id : int
team_mom : boolean

# The following will be how we can relate all the specific 'class' of peopleback to teams, orgs, and leagues for communication reasons

(Joint Table) Players-Team
player_id : int
team_id : int

(Joint Table) Players-Parents
player_id : int
parent_id : int

# Not sure if we need this one...
(Joint Table) Parents-Players
parent_id : int
player_id : int

(Joint Table) Parents-Teams
parent_id : int
team_id : int

(Joint Table) Coaches-Teams
coach_id : int
team_id : int

(Joint Table) Managers-Teams
manager_id : int
team_id : int

(Joint Table) Managers-Organizations
manager_id : int
organizaion_id : int

(Joint Table) Managers-Leagues
manager_id : int
league_id : int
8 changes: 8 additions & 0 deletions artifacts/issues.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Current issues/missing abilities with the 'sports_org_erd_v3.mwb'

1) Create a roster for a game.
2) Archive all team information for a given year.
3) Player and team accounting related to fees.
4) Web sessions? Not sure if this is related to database design.
5) Person-to-Person Message logging.

Binary file added artifacts/sports_org_erd_v3.mwb
Binary file not shown.
34 changes: 34 additions & 0 deletions generate_tables.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

## Scaffolds
# Person (People) table
rails g scaffold person id:int first_name:string last_name:string addr_route:string addr_city:string addr_state:string addr_zip:string username:string pass_hash:string pass_salt:string bio:text gender:string height_in_inches:string weight_in_pounds:string birth_month:int birth_day_number:int birth_year:int
# Phone_number (Phone_numbers) table
rails g scaffold phone_number phone:int person:references phone_id:string
# Email (Emails) table
rails g scaffold email email:string person:references
# Certification (Certifications) table
rails g scaffold certification person:references certification_name:string expiration_date:datetime note:text
# Role (Roles) table
rails g scaffold role id:int description:string value:int
# Team (Teams) tables
rails g scaffold team id:int team_name:string competitive:boolean age_group:string
# Organization (Organizations) table
rails g scaffold organization id:int name:string
# Event_property_map table
rails g scaffold event_property_map event_id:int key:string value:string
# Event (Events) table
rails g scaffold event id:int event_type:int event_datetime:datetime team_id:int created_by:int open_to_public:boolean
# Event_type table
rails g scaffold event_type id:int type_description:string


## Create Join Tables through migrations
# Parent_children (Join table)
# Team_people (Join table?)
# Team_person_roles (Join table)
# Organization_teams (Join table)


# Migrate the database
rails db:migrate