Im trying to set up a table for members for my rotary club but need some advice.
I think this is a good start
CREATE TABLE Members (
Member_ID INT(5) autonumber PRIMARY KEY,
Member_Name VARCHAR,
Member_Pic VARCHAR,
Member_Bio TEXT,
Member_Since DATE,
Member_Occupation VARCHAR,
Member_Phone VARCHAR,
Member_Email VARCHAR,
Member_Faceebook VARCHAR,
Member_Twitter VARCHAR,
Member_Linkedin VARCHAR,
Member_Youtube VARCHAR,
Member_Website VARCHAR,
Member_Classification VARCHAR,
Member_Achievements VARCHAR
)
Im pretty sure thats all the info I need to know about each member. Is this correct how I set this up or is there a better way?
Thanks…
system
2
I would suggest splitting the member’s name into 2 columns for first and last name.
this will make it easier to search for users with a given last name later on.
r937
3
i would not stuff “Member_” at the front of every column name
and of course you must supply lengths for all the VARCHARs
whether any columns are missing, i wouldn’t know, as i am not familiar with how the members of a rotary club rotate (or whatever it is they do)

ok, its been changed to;
CREATE TABLE Members (
ID INT IDENTITY(1,1) PRIMARY KEY,
First_Name VARCHAR(20),
Last_Name VARCHAR(25),
Pic VARCHAR(10),
Bio TEXT(1000),
Active_Since DATE,
Occupation VARCHAR,
Phone VARCHAR(15),
Email VARCHAR(50),
Faceebook VARCHAR(20),
Twitter VARCHAR(20),
Linkedin VARCHAR(20),
Youtube VARCHAR(20),
Website VARCHAR(25),
Classification VARCHAR(30),
Achievements VARCHAR(20)
);
And seems ok,
I do have a few questions though…
-
the Bio column, is that the right datatype as some idiot might put his height (number) into it or something… so what would you recommend?
-
On the Active_Since column, the date is stored in the table in YYYY-MM-DD format right?
system
5
yep, that looks better.
the data types look ok but you would have a better idea of the actual data going into the table than I would.
the only other suggestion I would make is assuming some of those columns will be storing urls, maybe consider widening them a bit more.
donboe
6
^ Agree those facebook url’s can be quite long
r937
7
not exactly, but for practical purpose, it doesn’t hurt to think of it in those terms
date values have to go into the table in year-month-day sequence, but they can be displayed in whatever format you like in a query