Sample App: FFAssist Using Crystal .NET for VS 2005 - Part 1
page 4 of 4
by Eric Landes
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 20231/ 38

Database Schema

The following is the schema I developed for the different tables.  I am not using any type of naming convention for the table names, but I do with Stored Procedures and views.  The naming convention for the Stored Procedures is to put a p_ then a description of the function and finally the table name, or a description or the joins being used.  For example, a query selecting all records in the Players table would be called p_get_players. 

CREATE TABLE [dbo].[Players] (
[Player_id] [int] IDENTITY (1, 1) NOT NULL ,
[Team_ID] [int] NOT NULL ,
[Position_ID] [int] NOT NULL ,
[PlayerName] [nvarchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[InjuryStatus] [nvarchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]


GO


CREATE TABLE [dbo].[Positions] (
[PositionID] [int] IDENTITY (1, 1) NOT NULL ,
[Position] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[Description] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]


GO


CREATE TABLE [dbo].[Stats] (
[Stats_ID] [int] IDENTITY (1, 1) NOT NULL ,
[Player_ID] [int] NOT NULL ,
[PassingYds] [int] NULL ,
[PassingAttmpts] [int] NULL ,
[PassingComplt] [int] NULL ,
[PassingTDs] [int] NULL ,
[Inteceptions] [int] NULL ,
[PassingLong] [int] NULL ,
[RuningYds] [int] NULL ,
[RunningAttmpts] [int] NULL ,
[RunningAvg] [int] NULL ,
[RunningTD] [int] NULL ,
[RunningLong] [int] NULL ,
[GameNumber] [int] NOT NULL ,
[Year] [int] NOT NULL 
) ON [PRIMARY]


GO


CREATE TABLE [dbo].[Teams] (
[TeamID] [int] IDENTITY (1, 1) NOT NULL ,
[TeamName] [nvarchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[TeamCity] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[TeamState] [nchar] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]


GO

Currently it's very simple, with Team, Player, Positions and Stats as the main table.  The first report in the application uses Stats, Player and Team.  In the second installment of this article, I'll step you through the code and pages.


View Entire Article

User Comments

Title: cc   
Name: kk
Date: 2005-12-20 5:45:50 PM
Comment:
good
Title: CR Export Binary Bug   
Name: Tim Curtin
Date: 2005-11-02 11:39:02 AM
Comment:
Eric,
VS 2003 (CR) has a nasty bug where if the bound dataset has a blob field that is null and you try to export to PDF, it blows up. Is it fixed? Bus Objects never replied.

Product Spotlight
Product Spotlight 



Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-04-23 11:05:56 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search