View previous topic :: View next topic |
Author |
Message |
TuMTuM
Joined: 17 Feb 2002
Posts: 425
|
Posted: 11-01-2002 07:54 AM Post subject: |
|
|
Mkay, say for news, profiles and threads on a forum you have 1 table. In this table it has a section id (as a field), and lets say section 1 is news, section 2 is profiles and section 3 and so on are forums. You can have everything integrated in the forum if you would want that, but you can also have them as a seperate page with seperate styling. There is no need to have seperate tables for this, I mean it just seems pointless database filling, AND, if you want the basic functions for everything. You want people to be able to post reply's to your profile, or to your news. If you dont understand all this, let me write a sample tonight using phpBB, I think you will understand then. In short, everything is a thread in the forum, they can all use the same BB code and stuff, but the scripts that parse their info are completely different.
Oh, and I have no problem with using server sided sockets, only to send messages that way, you will still need to use polling. I know this cause I have a book that has several chapters about creating an irc client in php. They used streaming html, but they had 2 frames, and in one fram you could submit a message, it got put in the database, and then the other frame read the database, say every second and if it finds a message their it puts it in the channel. |
|
Back to top |
|
Pezko
Joined: 09 Feb 2002
Posts: 186
|
Posted: 11-01-2002 09:41 AM Post subject: |
|
|
... The next person who asks me if I understand something simple will be shot... with a very big gun......
k... now to the reply! Having the same table for news and forum make sense yes, but for user profile? No... in user profile there will be stuff like email, password and stuff... Or maybe we have different defintions of "profile"? :)
And I thought you meant everything could be done with only one table.. :) |
|
Back to top |
|
TuMTuM
Joined: 17 Feb 2002
Posts: 425
|
Posted: 11-01-2002 09:56 AM Post subject: |
|
|
Mrmbmrmbl... replace profile with 'personal home page', what I meant is, the big text you can have on there, with stuff like a biography should be on there, cause thats what people will reply to.
[edit:] Like this |
|
Back to top |
|
Pezko
Joined: 09 Feb 2002
Posts: 186
|
Posted: 11-01-2002 11:13 AM Post subject: |
|
|
020: Wie bewonder je enorm: Mijzelf
021: Meest sexy personen: Tja, ik weet toch ook niet hoe die pr0n actrices in het echt heten
Hrm.. :)
Don't know if it's a good idea to have that kind of stuff in the same table as threads/news... I'm not even sure it's a good idea to have threads and news in the same table...
What if you want to add something to threads only? |
|
Back to top |
|
TuMTuM
Joined: 17 Feb 2002
Posts: 425
|
Posted: 11-01-2002 03:50 PM Post subject: |
|
|
Uhm, what do you mean with adding something to threads only? |
|
Back to top |
|
Pezko
Joined: 09 Feb 2002
Posts: 186
|
Posted: 11-01-2002 04:29 PM Post subject: |
|
|
Adding something to forum things only... and not to news! |
|
Back to top |
|
TuMTuM
Joined: 17 Feb 2002
Posts: 425
|
Posted: 11-01-2002 06:33 PM Post subject: |
|
|
Well, since it has the forum id instead of the news id, it will appear there. If it had the news id, it would appear in the news section, etc. |
|
Back to top |
|
Pezko
Joined: 09 Feb 2002
Posts: 186
|
Posted: 11-02-2002 05:16 AM Post subject: |
|
|
Well blubb... If you want to add some feature that requires changing of database, then you'd have an empty field if it is news...
Example
table looks like this:
Code:
id
section
poster
text
Now let's say we want to add something to the forum, (But not to news!) that requires the field X to be added to the table. Then X would be emtpy for all news.
When it's only one thing it doesn't matter that much, but say if we want to add 3 things to news and 3 to forum :)
(As you can see I like flexibility and scalability.. :) ) |
|
Back to top |
|
M0nKeY
Joined: 09 Feb 2002
Posts: 1235
|
Posted: 11-02-2002 06:02 AM Post subject: |
|
|
Huh??? wouldn't you be able to determine if its news by the "section" value???? Section 1 = News, 2 = games ECT.
and are you forgetting "icon" or are posts not going to have a main Icon?
"Then X would be emtpy for all news"
So what?
its not like thats a big deal.
Code:
id
section
poster
text
icon
rating
and just for reference heres a post table generated for vBB.
(forgot about recording IPs... some users may post from different IPs)
Code:
postid
threadid
username
userid
title
dateline
attachmentid
pagetext
allowsmilie
showsignature
ipaddress
iconid
visible
edituserid
editdate
|
|
Back to top |
|
js995
Joined: 10 Feb 2002
Posts: 226
|
Posted: 11-02-2002 06:57 AM Post subject: |
|
|
looking through winmysqladmin, it seems that all forum software uses like, 10 tables or more, so using one extra for news (IMHO) isnt gonna be a big change, but would give a lot more benefits. |
|
Back to top |
|
Pezko
Joined: 09 Feb 2002
Posts: 186
|
Posted: 11-02-2002 07:31 AM Post subject: |
|
|
Quote: Huh??? wouldn't you be able to determine if its news by the "section" value???? Section 1 = News, 2 = games ECT.
yes
[qoute]
and are you forgetting "icon" or are posts not going to have a main Icon?
[/quote]
It was a hiag"OHR)"YG")VRYHV "N example
Look at this:
Code:
{common shit}
X1
X2
X3
Y1
Y2
Y3
and Y* is only used for forum and X* is only used for news... seems better to have it in seperate tables. It's not like it will be any harder to code it. |
|
Back to top |
|
Shn
Joined: 10 Feb 2002
Posts: 738
|
Posted: 09-09-2003 01:07 PM Post subject: |
|
|
SO !?
WHere's the finished product ?? |
|
Back to top |
|
|