![]() |
Looking for input on data organization/queries
I'm working on a project that will add a "team page" to my boards for all professional sports teams. As far as programming experience, I'm still a relative PHP/SQL newbie, but I've taken classes that teach C, C++, and Java, so I figure it won't be that hard for me to pick up. Right now, I'm working on organizing tables for the SQL database and figuring out the best arrangement. Right now, I want to get this done so I can work on the team standings portion of the project. That portion will put the team's division standings on the respective team page. Here's the tables I have along with items in each table:
clubhouse_sportname: sportid (smallint-2), sportname (varchar-200), sportabbrev (varchar-5) clubhouse_conferences: confid (smallint-3), sportid (smallint-2), confname (varchar-200), confabbrev (varchar-5) clubhouse_divisions: divid (smallint-3), confid (smallint-3), sportid (smallint-2), divname (varchar-100), divabbrev (varchar-8) clubhouse_teams: teamid (smallint-4), divid (smallint-3), confid (smallint-3), sportid (smallint-2), teamname (varchar-100), teamabbrev (varchar-5) Now, the way I'm thinking to do this would be to have the teams viewable by clubhouse.php?team=1, for example (Not sure of the exact terminology). At that point, I'd do a query to the teams table to get the team's data in regards to division, etc. From there, I could do a query into a separate standings table to get the standings for each team. Then comes the interesting part. In the case of tiebreakers, I'd have to sort by multiple methods (For example, I'd have to sort by team record THEN division record, and so on). Now that I've given you the information, my questions. I'm not asking how to do it, per se, but if how I'm doing it would be the most organized and efficient way. If you have any suggestions, I'd greatly appreciate it. 1] Is this the best way I can go about organizing my data? 2] Is the method I have in mind for doing queries the best one I could use? 3] Is it possible to sort using multiple criteria (multiple sorts of data) using SQL queries? And of course, any other suggestions would be greatly appreciated. |
All times are GMT. The time now is 08:41 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|