 | |  | | | vBGallery Suggestions Post your comments, suggestions, and other feedback about PhotoPost vBGallery here. |
April 29th, 2005, 11:09 PM
|
#1 (permalink)
| | Member Verified Customer
Join Date: Jan 2003 Location: Gilbert, AZ
Posts: 394
| username in lots of tables
I see lots of references to "username" in these tables. Why is that? If someone changes there username, what will happen to all these pictures, posts etc. that rely on username? Why not just use the userid as the foreign key and get the name from the one table that should be allowed to have the username, "user"?
|
| |
April 29th, 2005, 11:18 PM
|
#2 (permalink)
| | Ultimate Member Verified Customer
Join Date: Nov 2003 Location: Raleigh, NC
Posts: 1,413
| Re: username in lots of tables
There's an option under the gallery maintenance to refresh those if you change any usernames.
I assume it's done to cut down on database hits doing all those joins... Dunno.
|
| |
April 29th, 2005, 11:21 PM
|
#3 (permalink)
| | Member Verified Customer
Join Date: Jan 2003 Location: Gilbert, AZ
Posts: 394
| Re: username in lots of tables
i don't think that's a good idea. a join is nothing. I think i may change the queries for myself.
|
| |
April 29th, 2005, 11:23 PM
|
#4 (permalink)
| | Ultimate Member Verified Customer
Join Date: Nov 2003 Location: Raleigh, NC
Posts: 1,413
| Re: username in lots of tables
Why add work for yourself? Do you have people changing their names all the time? I get maybe 2 name change requests a year.
|
| |
April 29th, 2005, 11:38 PM
|
#5 (permalink)
| | Member Verified Customer
Join Date: Jan 2003 Location: Gilbert, AZ
Posts: 394
| Re: username in lots of tables
yes, i do. few a month. as a graduate in db design & dev, it just irks me to see bad db design. no offence to any of the devs, it's still great work. I noticed also that one of the username fields had a datatype of TEXT. thats a lot of space being reserved for nothing. It was prolly just an oversight tho.
|
| |
April 29th, 2005, 11:41 PM
|
#6 (permalink)
| | Ultimate Member Verified Customer
Join Date: Nov 2003 Location: Raleigh, NC
Posts: 1,413
| Re: username in lots of tables
So did you change all the same stuff in vBulletin itself too?
thread table has postuserid, along with postusername, and lastposter is the text name of the user as well.
forum table stores the whole title of the last posted thread, along with the threadid, and also keeps up with the lastposter userid and username.
All this is done for a reason... Lots of joins will kill you in a high traffic situation. (But, you already know that since you're a graduate of database design.  )
|
| |
April 29th, 2005, 11:51 PM
|
#7 (permalink)
| | Ultimate Member Verified Customer
Join Date: Nov 2003 Location: Raleigh, NC
Posts: 1,413
| Re: username in lots of tables
(PhotoPost does it in a few places also, btw.)
|
| |
April 30th, 2005, 10:58 AM
|
#8 (permalink)
| | Guest | Re: username in lots of tables
As ConqSoft said, it's to cut down on the number of joins and strain on the server. Which is more expensive, extra server space, or a better server? Even on my personal site with over 10,000 images the adv_gallery_images table only takes up 1.4mb.
Where are you seeing a useraname column that's defined as a text column? I just looked through the database structure and I'm not seeing one...
| |
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Rate This Thread | Linear Mode | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -5. The time now is 08:18 PM. | |