Why the hell _Memo Contains Character type ?

07/09/2013 20:28 ahmed4ever2u#1
i just wonder !
does any one know why ?
its just curios what lead me to ask such question .
[Only registered and activated users can see links. Click Here To Register...]
07/09/2013 20:33 Kape7#2
The race
07/09/2013 20:37 ahmed4ever2u#3
and why the race is important in such table ?
07/09/2013 20:50 LastThief*#4
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 sinxtra#5
Quote:
Originally Posted by LastThief* View Post
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 Kape7#6
Quote:
Originally Posted by ahmed4ever2u View Post
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 Schickl#7
Quote:
Originally Posted by LastThief* View Post
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 LastThief*#8
Quote:
Originally Posted by Schickl View Post
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 Schickl#9
Quote:
Originally Posted by LastThief* View Post
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 IceAmStiel#10
_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 :o
07/10/2013 13:26 Kape7#11
Quote:
Originally Posted by IceAmStiel View Post
_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 :o
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 IceAmStiel#12
Quote:
Originally Posted by Synx7 View Post
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.

[Only registered and activated users can see links. Click Here To Register...]

I doubt that they ever gonna change the country id's when they've already considered the arabian race in the current setup [Only registered and activated users can see links. Click Here To Register...]
07/10/2013 18:27 Schickl#13
Quote:
Originally Posted by IceAmStiel View Post
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.

[Only registered and activated users can see links. Click Here To Register...]

I doubt that they ever gonna change the country id's when they've already considered the arabian race in the current setup [Only registered and activated users can see links. Click Here To Register...]
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 IceAmStiel#14
Quote:
Originally Posted by Schickl View Post
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 gigola123#15
It's for show the face of the character maybe ? Like in an exchange but it's probably not finish ?