Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Fischecp
Starting Member
2 Posts |
Posted - 2007-12-06 : 00:24:24
|
Hi All,I am pretty new to SQL Server but I have some general questions. I decided to build a game for a lot of my friends which involves the NFL, College Football, and local High School Football. Basically, you rank each NFL game that is played that week 1-16. 16 being the game you feel the strongest about and 1 being the game you think could go either way. Same with College and Highschool but only 5 games in each category. All that my friends do is pick a team and rank them. Now here comes the question. I have sat here for countless hours trying to come up with a database structure for this. I want them to be able to click on a team on the website and it will pop up a nice little box that reads them the week, opponent played, win/loss, and score for each team. For instance, If they click on Miami Dolphins, I want it to show their opponents for the 16 weeks or however many weeks there are, and the win/losses and scores. Kind of like www.espn.com's boxes when you click on a team or player. Anyway, keep in mind all of this is on top of their selections and ranks that are being stored. On top of all of this, I have to come up with scores for each friend too and keep track of their standings week to week. Argg, so confusing. Anyway, can anyone give me a tip for how to structure the database tables and whatnot? Ive gone through about 30 pages of paper with flawed plans and I cant come up with a sound plan.I realize Ill have to input a lot of data such as who each team is playing and the scores of the games for each week, but I was hoping to have everything else calculated pretty much on its own.I have read through quite a few books trying to learn as much as possible about SQL server 2005, but there wasn't anything like this in any of them =) Sorry if this sounds confusing, Its late and I am incredibly frustrated =)Thanks,Chris |
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2007-12-06 : 05:23:02
|
What you display to the user is more a front end issue. From the back end, as long as you know where everything is stored, then passing the data to the front end can be completed using stored procedures, this has the added bonus of keeping the back end more secure and just passing parameters through to the DB server.As far as table layout goes, whatever is the easiest for you to do your input. Bear in mind that having a denormalised database is good for iunput, but not so good gfor retrieving information, whereas having too many tables will make your input much harder.So, you could have a Team table, a Match table and a table for your User information and possibly another for their predictions.Other than this, you will need to look into what you can do with T-SQL. |
 |
|
JasonL
Starting Member
35 Posts |
Posted - 2007-12-16 : 00:48:48
|
RickD is right that the display is a front end issue. You do not want to confuse database design with WEB/USER interface issues. From the sound of it, you need some help on the database design and you should not look at the database design from the front end interface standpoint. If you could start by coming up with all the tables (and data fields) you think you are going to have and post on this board, I am quite sure you will get a few feedback on how to layout your tables.JasonLhttp://blogs.msdn.com/usisvde/ |
 |
|
|
|
|
|
|