Guid or ID for my custom

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
9/3/2010 4:12:31 AM
Gravatar
Total Posts 8

Guid or ID for my custom

Hi,

I have spent the last week building custom solutions in mojoPortal and think I get how to work most of the things. I must say that I love the whole solution, compared to the struggles I had with DNN before..

I really would like to be able to do searches in apidocs.mojoportal.com, have I missed something there or is it nor possible?

My question is whatever I should have primary key as a Guid or an auto increment ID? I have never my self been using Guid as the primary key and I have looked in other mojoPortal features and it seems both ways are being used. I want to get it right and don't want to end up in problem later on.. I know about the pro's using Guid are when merging databases or copy data between one db to another.. As well adding data from an external source might be more easy.

But are there any advantages that has something to do with mojoPortal?

Is there any performance considerations instead of using an Int primary key?

Am I just worrying about a non issue here?

 

Thanks for a brilliant job with mojo!

Cheers,

Stefan 

9/3/2010 6:53:03 AM
Gravatar
Total Posts 18439

Re: Guid or ID for my custom

It is up to you whether to use integer or guid ids in a custom feature. One advantage of guids in mojoPortal is that they enable you to utilize some sub systems like ContentRatings, Content History, and other planned sub systems because you can store and retrieve items from those sub systems using your item guid. So if you want to use those subsystems then guid has an advantage. Of course if you still would rather use an integer, you can do that but also add a unique indexed guid column as an alternate key then you can still get the benefits of a guid. Integers can be a little faster when joining large tables, so if your feature is going to have multiple tables to join with millions of rows then integers might be better.

Hope it helps,

Joe

You must sign in to post in the forums. This thread is closed to new posts.