|
|
| Author |
Topic |

Ausser
Cybertech Industrials Agency
 |
Posted - 2008.05.26 11:14:00 -
[1]
The following questions popped up while working on the database design for a new tool:
a) Can corporationID and characterID be merged into one column without the risk of collisions? b) Can allianceID collide with them? c) How are these related to itemID in dbo.eveNames? (there are lots of other entities within itemID domain) d) If corporationID and characterID are in the same domain, is there a way to distinguish them by their numeric values?
These lead to the following general questions:
What is known about allocation schemes of id numbers in the eve system architecture?
What are the entity classes and how is their inheritance path?
I remember there was a post from a dev long time ago, describing some entities and their inheritance path. I've lost the link and did not found it by search/google. 
When looking on eveNames.itemID you will find: 500.001 - ...: Factions 1.000.001 - ...: NPC Coprorations 3.000.001 - ...: NPC Agents 10.000.001 - ...: Regions 20.000.001 - ...: Constellations 30.000.001 - ...: Solar Systems 40.000.001 - ...: Celestial Bodies like suns, planets, belts, etc. 50.000.001 - ...: Stargates (in mapDenormalize.itemID, mapJumps.stargateID but not in eveNames.itemID) 60.000.001 - ...: Stations (with some strange relation to AssetList.locationID) 150.131.146 - ...: ??? - chars/corps ??? (in eveNames.itemID, these look like some test data)
Any thoughts/comments/crosslinks are welcome. 
|

Ausser
Cybertech Industrials Agency
 |
Posted - 2008.05.26 11:14:00 -
[2]
The following questions popped up while working on the database design for a new tool:
a) Can corporationID and characterID be merged into one column without the risk of collisions? b) Can allianceID collide with them? c) How are these related to itemID in dbo.eveNames? (there are lots of other entities within itemID domain) d) If corporationID and characterID are in the same domain, is there a way to distinguish them by their numeric values?
These lead to the following general questions:
What is known about allocation schemes of id numbers in the eve system architecture?
What are the entity classes and how is their inheritance path?
I remember there was a post from a dev long time ago, describing some entities and their inheritance path. I've lost the link and did not found it by search/google. 
When looking on eveNames.itemID you will find: 500.001 - ...: Factions 1.000.001 - ...: NPC Coprorations 3.000.001 - ...: NPC Agents 10.000.001 - ...: Regions 20.000.001 - ...: Constellations 30.000.001 - ...: Solar Systems 40.000.001 - ...: Celestial Bodies like suns, planets, belts, etc. 50.000.001 - ...: Stargates (in mapDenormalize.itemID, mapJumps.stargateID but not in eveNames.itemID) 60.000.001 - ...: Stations (with some strange relation to AssetList.locationID) 150.131.146 - ...: ??? - chars/corps ??? (in eveNames.itemID, these look like some test data)
Any thoughts/comments/crosslinks are welcome. 
|

Ausser
Cybertech Industrials Agency
 |
Posted - 2008.05.26 13:47:00 -
[3]
Lingorm, thanks you for fast response and clarification. 
Wallet Accounts
Are wallet accounts (from AccountBalance, referenced by accountID) items too? Is accountID fixed so it will never walk arround or become recycled?
I suppose there are no collisions of accountID between corp and char accounts, so i could use accountID as foreign key in journal, transactions and orders to accociate them with chars/corps.
eveLocations
Hmmm... i dont have this table in the dump i'm using - need to investigate later why i've missed that.
I've allready noticed the 'tricky' way how locationID->stationID mapping is used in AssetList. So i suppose itemID and locationID are seperate columns in eveLocations? Or do the references in AssetList.locationID point to special items, which are embedded inside of their stations? Could you give us some more details which columns are present in eveLocations and how it works? I've allready wondered about types like typeID=26 (Office Folder), 27 (Office) and 28 (Factory Folder) and how these are intended to be used.
|

Ausser
Cybertech Industrials Agency
 |
Posted - 2008.05.27 11:47:00 -
[4]
My wallet question is related to accountID returned from the API calls /char/AccountBalance.xml.aspx and /corp/AccountBalance.xml.asp.
If accountID is unique without collisions between char/corp wallet accounts, then it is verry usefull.
My current database design looks like this:
There is one walletAccounts table to link between wallets and their owners (char/corp), with fields ownerID - foreign key - reference to char or corp accountID - primary key - from AccountBalance.xml.aspx accountKey - encodes the purpose of the account - from AccountBalance.xml.aspx accountName - from CorporationSheet.xml.aspx, default value for char accounts (char name) accountBalance - from AccountBalance.xml.aspx
For orders, transactions and journal, there is one table each, with an accountID column (foreign key with index). It links back to the walletAccounts table. So the accountKey/characterID/corporationID combination is obsolete and will not be stored on these tables.
I'm also using the accountID as key for api cache state management (WalletJournal and WalletTransactions api calls).
I assume accountID is unique (is it? i'm not sure) so it can be used that way. If it is not, or if it will move arround someday, then i would use a different aproach: an auto-generated primary key on the walletAccounts table could imitiate nearly the same functionality.
It would be nice if a future version of the api could make more use of accountID instead of accountKey in the results of journal/transactions/orders related api calls.
|

Ausser
Cybertech Industrials Agency
 |
Posted - 2008.05.28 13:50:00 -
[5]
While digging in the database dumps, i came across the following record in invFlags:
flagID=1 flagName='Wallet'
So a wallet seems to be some kind of 'Sub-Location' of another item (char/corp)?
I'm verry curious to see what you will find out about accountID, Lingorm. Thanks a lot for spending your time to dig up answers for us. 
I will have to spend much more time with the inventory system of eve, there is lot to learn about. It seems to have an interesting structure.
|
|