|
You last visited: Today at 21:49
Advertisement
Why the hell _Memo Contains Character type ?
Discussion on Why the hell _Memo Contains Character type ? within the SRO Private Server forum part of the Silkroad Online category.
07/09/2013, 20:28
|
#1
|
elite*gold: 0
Join Date: Nov 2009
Posts: 1,515
Received Thanks: 891
|
Why the hell _Memo Contains Character type ?
i just wonder !
does any one know why ?
its just curios what lead me to ask such question .
|
|
|
07/09/2013, 20:33
|
#2
|
elite*gold: 0
Join Date: Dec 2007
Posts: 3,210
Received Thanks: 6,301
|
The race
|
|
|
07/09/2013, 20:37
|
#3
|
elite*gold: 0
Join Date: Nov 2009
Posts: 1,515
Received Thanks: 891
|
and why the race is important in such table ?
|
|
|
07/09/2013, 20:50
|
#4
|
elite*gold: 60
Join Date: Feb 2012
Posts: 3,942
Received Thanks: 6,474
|
Used in "friend list" to display the icon next to the char name probably Joymax was uber lazy that they didn't do simple query to fetch refobjid from _Char table
|
|
|
07/09/2013, 20:57
|
#5
|
elite*gold: 0
Join Date: Apr 2009
Posts: 1,300
Received Thanks: 952
|
Quote:
Originally Posted by LastThief*
Used in "friend list" to display the icon next to the char name probably Joymax was uber lazy that they didn't do simple query to fetch refobjid from _Char table
|
Their whole database is a mess.
|
|
|
07/09/2013, 21:04
|
#6
|
elite*gold: 0
Join Date: Dec 2007
Posts: 3,210
Received Thanks: 6,301
|
Quote:
Originally Posted by ahmed4ever2u
and why the race is important in such table ?
|
My bad, I through it was shown too on the PM's, but seems the race icon only appear on the friend list (maybe the old PM window had the race icon, who knows).
It probably has no use right now.
|
|
|
07/10/2013, 09:33
|
#7
|
elite*gold: 0
Join Date: Feb 2009
Posts: 1,064
Received Thanks: 539
|
Quote:
Originally Posted by LastThief*
Used in "friend list" to display the icon next to the char name probably Joymax was uber lazy that they didn't do simple query to fetch refobjid from _Char table
|
They weren't lazy
It's just a question of performance
It's better to save it in another table than to query it every time
And the character model changes like never
Their database is not THAT bad
Sure they missed quite a lot of things, but they know what they're doing, you can see that.
I doubt that anyone here could do it better
|
|
|
07/10/2013, 09:43
|
#8
|
elite*gold: 60
Join Date: Feb 2012
Posts: 3,942
Received Thanks: 6,474
|
Quote:
Originally Posted by Schickl
They weren't lazy
It's just a question of performance
It's better to save it in another table than to query it every time
And the character model changes like never
Their database is not THAT bad
Sure they missed quite a lot of things, but they know what they're doing, you can see that.
I doubt that anyone here could do it better
|
Because SELECT RefObjID FROM _Char WHERE CharID = '123123' will take more time to execute than SELECT RefObjID FROM _Memo WHERE CharID = '123123'
|
|
|
07/10/2013, 11:53
|
#9
|
elite*gold: 0
Join Date: Feb 2009
Posts: 1,064
Received Thanks: 539
|
Quote:
Originally Posted by LastThief*
Because SELECT RefObjID FROM _Char WHERE CharID = '123123' will take more time to execute than SELECT RefObjID FROM _Memo WHERE CharID = '123123'
|
Yeah cool, you're selecting a row from _Char
Not _Memo. So instead of obtaining the wanted Memo info, you just got the char info
well done genius
|
|
|
07/10/2013, 12:14
|
#10
|
elite*gold: 0
Join Date: Jul 2011
Posts: 1,058
Received Thanks: 1,118
|
_Memo will most likely contain less records than _Char and the chance of the record at _Memo being locked by another transaction (Assuming they aren't using the NOLOCK hint in their query; query executed on _Memo is "SELECT ID64,FromCharName,Message,Date,RefObjID,Status FROM _Memo WHERE CharID = %d") is far less than on _Char that is frequently updated and used to select character information.
I don't know though why they store the ObjID rather than the CountryID
|
|
|
07/10/2013, 13:26
|
#11
|
elite*gold: 0
Join Date: Dec 2007
Posts: 3,210
Received Thanks: 6,301
|
Quote:
Originally Posted by IceAmStiel
_Memo will most likely contain less records than _Char and the chance of the record at _Memo being locked by another transaction (Assuming they aren't using the NOLOCK hint in their query; query executed on _Memo is "SELECT ID64,FromCharName,Message,Date,RefObjID,Status FROM _Memo WHERE CharID = %d") is far less than on _Char that is frequently updated and used to select character information.
I don't know though why they store the ObjID rather than the CountryID 
|
Because is not a good structured method to store reference data on a non-reference table. If for some reason they decide that the countryID is now 4 for china chars instead of 0, and 2 for european, they just have to change the reference tables, and since the other tables obtain the data by the primary key of the reference table there will never be data corruption.
|
|
|
07/10/2013, 14:59
|
#12
|
elite*gold: 0
Join Date: Jul 2011
Posts: 1,058
Received Thanks: 1,118
|
Quote:
Originally Posted by Synx7
Because is not a good structured method to store reference data on a non-reference table. If for some reason they decide that the countryID is now 4 for china chars instead of 0, and 2 for european, they just have to change the reference tables, and since the other tables obtain the data by the primary key of the reference table there will never be data corruption.
|
By storing the CountryID I actually meant that the _Memo_Add procedure shall get the Country.dbo._RefObjCommon and store it instead of the RefObjID that is passed to it.
I doubt that they ever gonna change the country id's when they've already considered the arabian race in the current setup
|
|
|
07/10/2013, 18:27
|
#13
|
elite*gold: 0
Join Date: Feb 2009
Posts: 1,064
Received Thanks: 539
|
Quote:
Originally Posted by IceAmStiel
By storing the CountryID I actually meant that the _Memo_Add procedure shall get the Country.dbo._RefObjCommon and store it instead of the RefObjID that is passed to it.
I doubt that they ever gonna change the country id's when they've already considered the arabian race in the current setup
|
Yeah that was the only thing I was wondering about
Maybe they wanted to be able to display an icon for every char
dunno lol
|
|
|
07/10/2013, 18:53
|
#14
|
elite*gold: 0
Join Date: Jul 2011
Posts: 1,058
Received Thanks: 1,118
|
Quote:
Originally Posted by Schickl
Yeah that was the only thing I was wondering about
Maybe they wanted to be able to display an icon for every char
dunno lol
|
"Because joymax" as a reason works for nearly every case ;d
|
|
|
07/10/2013, 21:13
|
#15
|
elite*gold: 0
Join Date: Jun 2007
Posts: 722
Received Thanks: 390
|
It's for show the face of the character maybe ? Like in an exchange but it's probably not finish ?
|
|
|
Similar Threads
|
What was the best character type?
03/27/2010 - Silkroad Online - 27 Replies
WHAT WAS THE BEST CHARACTER TYPE???
STR BLADE???:confused:
STR GLAVIE??:confused:
NUKER SWORD/SHIELD??:confused:
NUKER SPEAR??:confused:
OR EUROPIANS AND WHAT TYPE OF BUILD AND WEAPON??
|
Need item type and token type boot
03/18/2008 - Conquer Online 2 - 1 Replies
Hi All programers and makers of boots, Great job. Could some one make item and token type boot for patch 5118. Please
|
All times are GMT +1. The time now is 21:49.
|
|