0

i have a problem in choosing data type for this column in SQL..can anybody help me???

result (tournament_id*, player_id*, round)
i've done the first 2 columns, i'm confused about the data type of round=='...i wondered if it was cstring or text or numeric
here's my code :

tournament_id int,
    player_id int,
    PRIMARY KEY (tournament_id,player_id) REFERENCES tournament(id),player(id),
    round  ???

and the request is
The result round of a player at a tournament can be one of these values: ‘Won’, ‘Final’, ‘Semi’, ‘Quarter’, ‘4’, ‘3’, ‘2’ and ‘1 round’. Except for ‘Won’, the value denotes in which round of the tournament the player lost.

3
Contributors
2
Replies
11
Views
3 Years
Discussion Span
Last Post by ugi.nagesh
0

Hi Ken,

You can maintain separate master table to store the different types of round data that you want

EX:

RoundMaster
(
Round_id integer primary key,
Round varchar(100)
)

Then reference the Round column in result table with Round_id of type integer.

Hope this will solve your problem

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.