Click to See Complete Forum and Search --> : [RESOLVED] MySQL Questions


BobH
04-20-2006, 06:36 PM
First post on this forum; so be gentle, please :)

After being volunteered to create a web site for our high school graduating class (1960), I've been busily learning HTML, CSS, PHP, Javascript and now MySQL. Did some mainframe programming back in the '70's but moved into management and lost most of my technical skills; so picking up some of this stuff isn't altogether NEW, it's just 'different'.

Anyway, I've hosted our web site on GoDaddy (www.broughton1960.com) and got MySQL in the package. I've been able to get logged in, create a database, and even build the first iteration of a table for storing current information about classmates. I say 'first iteration' because as I continue with this project I'm finding that I need to go back and re-do a lot of things. For example, I've had to change field names to make it easier to use some PHP scripts I wrote and to simplify understanding. Now I'd like to change the order in which fields are listed in my first table. It probably doesn't make any difference in terms of execution efficiency, but it will make it easier for me -- and anyone who might have to take up this project after me -- to manage things.

Question 1: Can anyone tell me how to go about rearranging the order in which fields (columns) occur in my table? It has not yet been populated with any data (rows). I've been using an interface tool published by Starfield Technologies that came with the GoDaddy subscription. I haven't found anything in it that allows me to rearrange the columns.

Question 2: Is it possible to populate my table from a Word document of names and addresses? I'm thinking in terms of manipulating the Word file to insert commas between fields like a .CSV file and importing it into the MySQL table. Can this be done? Is there an easier way?

Question 3: Having worked with Access and a few other RDBMS's I'm fairly sure that at some future time I will want to re-normalize my data structures which will probably entail breaking up tables into others and moving data around to follow structure changes. I realize that one should normalize one's data before beginning, but my experience has been that one doesn't always (almost never?) knows enough at the outset to get it right from the get-go. Will it be possible to do this without having to reinvent the wheel?

Thanks for your patience.

chazzy
04-20-2006, 07:42 PM
Bob:

1) rearranging the order of the columns really doesn't do anything. you need to go in and modify the order the columns appear in in the script, not the database.

2) No. You'd have to have it in access or excel, export it from there and import it into your database. this may be impossible with godaddy mind you. not sure what tools they give to people.

3) I have no idea what you're talking about in #3. Normalize your data from the beginning via E-R diagram and stick to it. the biggest problem i see is people not realizing mutlivalue fields when they see them. you should analyze requirements - do people need more than 1 address? do i want to have a hard coded limit of addresses? maybe that's not how you did it in your day, but that's how we do it now.

i think what you want to know is how hard is it going to be to rebuild the data into new tables. you should implement some scripts to do it, not do it by hand, this way you can test the outcome before you throw it into the site and see what happens.