Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 763875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T16:37:50+00:00 2026-05-14T16:37:50+00:00

I plan to create a table to store the race result like this: Place

  • 0

I plan to create a table to store the race result like this:

Place    RaceNumber       Gender      Name              Result    
12       0112              Male     Mike Lee            1:32:40 
16       0117              Female   Rose Mary           2:20:40 

I am confused at the items type definitions.

  1. I am not sure the result can be set to varchar(32) or other type?

  2. and for racenumber, between int(11) and varchar(11), which one is better?

  3. Can I use UNIQUE KEY like my way?

  4. Do I need to split name to firstname and lastName in my DB table?

DROP TABLE IF EXISTS `race_result`;
CREATE TABLE IF NOT EXISTS `race_result` (
  `id` int(11) NOT NULL auto_increment,
  `place` int(11) NOT NULL,
  `racenumber` int(11) NOT NULL,
  `gender` enum('male','female') NOT NULL,
  `name` varchar(16) NOT NULL,
  `result` varchar(32) NOT NULL,
  PRIMARY KEY  (`id`),
  UNIQUE KEY `racenumber` (`racenumber`,`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 AUTO_INCREMENT=3;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T16:37:50+00:00Added an answer on May 14, 2026 at 4:37 pm

    Some advice/opinions regarding datatypes.

    Result – This is a time, you may want to do some calculations on this time, therefore you should store it as a time type.

    RaceNumber – This is a reference, whilst it is a number, you will be performing no calculations on this number. Therefore you should store it as a varchar rather than an int. This will avoid confusion as to its usage and avoid accidently manipulation of it as a number.

    Name – Look at the length of string you allow for the Name. Be careful about limiting this value by so much. 16 characters may be too small for some names in the future.

    Place – Is this required storage? Can you calculate the place of a runner based on their Result alone? However, you should keep a good primary key for your table.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My schema looks something like this: CREATE TABLE plans ( id SERIAL PRIMARY KEY,
I need to create a database table to store different changelog/auditing (when something was
I plan to create an interactive golf score card for my website (XHTML). (Btw.
I plan to create 3 editions of a piece of software in Java from
Purpose: I plan to Create a XML file with XmlTextWriter and Modify/Update some Existing
I plan to store quite a few pieces of data about my users in
I plan to delete an entire table with over 930,000 rows of data. Which
I have Plan table that has a one to many relationship with a Price
I created a Power Pivot workbook that has information from our store (the plan
I have a table in Oracle 10 with following structure Create Table Bookmarks( BOOKMARKID

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.