User Profile Information

Just a quick question - I have been asked to build a games community portal for my current employer. User information is to include gaming platforms, basic contact information etc...

Normally I just create a sql database table to hold all this info - I was thinking along the lines of (see below), my question is: is this the best way to store the data, or use the .net profile system.

Any pointers would be really helpful. Thanks


Create Table: dbo.Contact
PRINT N'Table Created: dbo.Contact'

IF NOT EXISTS (SELECT 1 FROM sysobjects WHERE name = N'Contact' AND TYPE = 'U')
    CREATE TABLE [dbo].[Contact](
        [ContactID] [int] IDENTITY(1, 1) NOT NULL,
        [UserID] [uniqueidentifier] NOT NULL,
        [FirstName] [nvarchar](50) NOT NULL,
        [LastName] [nvarchar](50) NOT NULL,
        [Gender] [nchar](1) NOT NULL,
        [DateOfBirth] [nvarchar](10) NOT NULL,
        [Address1] [nvarchar](50) NULL,
        [Address2] [nvarchar](50) NULL,
        [Town] [nvarchar](50) NULL,
        [County] [nvarchar](50) NULL,
        [PostCode] [nvarchar](50) NULL,
        [CountryCode] [nchar](2) NOT NULL,
        [Telephone] [nvarchar](15) NULL,
        [Mobile] [nvarchar](15) NULL,
        [AlternativeEmail] [nvarchar](256) NULL,
        [Aim] [nvarchar](256) NULL,
        [Skype] [nvarchar](256) NULL,
        [MSN] [nvarchar](256) NULL,
        [ICQ] [nvarchar](256) NULL,
        [Playstation3] [bit] NULL,
        [Playstation2] [bit] NULL,
        [Xbox360] [bit] NULL,
        [Wii] [bit] NULL,
        [PC] [bit] NULL,
        [AboutMe] [nvarchar](512) NULL,
        [DateCreated] [datetime] NOT NULL,
        [CreatedBy] [uniqueidentifier] NOT NULL,
        [DateModified] [datetime] NOT NULL,
        [ModifiedBy] [uniqueidentifier] NOT NULL,
        [IsDeleted] [bit] NOT NULL,
        [RowGuid] [uniqueidentifier] NOT NULL
            CONSTRAINT [DF_Contact_RowGuid] DEFAULT (newid()) ROWGUIDCOL

        CONSTRAINT [PK_ContactID] PRIMARY KEY (ContactID),
        CONSTRAINT [FK_Contact_UserID] FOREIGN KEY (UserID) REFERENCES dbo.aspnet_Users(UserId),
        CONSTRAINT [FK_Contact_CountryCode] FOREIGN KEY (CountryCode) REFERENCES dbo.Country(CountryCode),
        CONSTRAINT [FK_Contact_CreatedBy] FOREIGN KEY (CreatedBy) REFERENCES dbo.aspnet_Users(UserId),
        CONSTRAINT [FK_Contact_ModifiedBy] FOREIGN KEY (ModifiedBy) REFERENCES dbo.aspnet_Users(UserId)

David Winchester

Please mark as answer if this is the solution.
8/28/2008 12:34:53 PM 3779 articles. 0 followers. Follow

3 Replies

Similar Articles

[PageSpeed] 31

I would suggest a mix of the 2, i.e. use the membership system for your login and roles, but then store your additional data in your own tables.

Its not easy to query against the Profile values stored via the membership provider, so pulling back all users who have a PS3 would be far more complex than a simple Where statement

Sharing Knowledge Saves Valuable Time!
8/28/2008 12:52:43 PM

Also check out this article for more info

Sharing Knowledge Saves Valuable Time!
8/28/2008 12:56:24 PM

 Thanks ganseki. exactly what I was looking for.

David Winchester

Please mark as answer if this is the solution.
8/28/2008 1:03:37 PM

Similar Artilces:

Modify User Information / User Profile
I have been rooting around looking for the answer... with no luck... I want to modify the User Information / User Profile collected, for example delete MSN, AIM and Yahoo and add City, State and Zip. Where is this? Is it right in front of my nose? Thanks in advance, (again). The table in the DB is the Community_Users table. You will have to either extend this table, or create a new table using a foreign key relationship to the users table to hold your new fields. You probably don't need to mod any stored proc though since the profile procedures use select * (bad design, but ...

How to store user profile information during create user?
Hi, I'm just try to store user information during create user via CreateUserWizard that add Textbox, DropDownList and RadoButtonList. How to store data form control to UserProfile (via CreateUserWizard) ? Note. I set DisableCreatedUser = true because want to proof user befor activate. (Begining V2.0, VB, VWD 2005 Express Edition) Here is some example c# code that I have in the CreateUser event of the CreateWizard command.  I also do some stuff after this but I think this is the code you are interested in.     protected void CreateUserWizard1_CreatedUser(objec...

How can I carry anonymous users profile information to authenticated user
HelloI can carry the anonymous users profile information like favourite team name etc but when the user logs in how can I  carry the profile knowledge to the authenticated users profile.Good Nights Please provide some more information about the hangup. At least I couldn't understand what exactly are you trying to achieve. So simple... yet so effective.My "Life"ly Blog You need to add the Profile_MigrateAnonymous event in your global.asax. Here's a sample: void Profile_MigrateAnonymous(object sender, ProfileMigrateEventArgs e) { //Migrate Profile Profil...

Profile Information of User
I have a static class and a static method within the class that I want to use to return the profile of a member. This is the method:public static ProfileCommon GetProfile(MembershipUser usr)       {           ProfileCommon userProfile = null;           userProfile = userProfile.GetProfile(usr.UserName);           return userProfile;       }This is throwing an error so I am enquirying i...

Single Users Profile and All Users Profiles List
I've made a discussion forum. And I have also installed simply membership. Now I want after click on user link to redirect to the page with User's info.I have simply user "John" and user "Bob" and everyone can click on those names and will see page with informations stored in Profile (Like Profile.Name, Profile.Address). I have three simply question:1. How to show profile values of other User ? Like I wrote above.2. How to list all users with for example their e-mails ? I mean: UserLogin - UserName - UserMail3. Or the easier way is to make new table with those all information an...

SQLGrid User Profile information?
I'm trying to use the excellent SQLGridSelectedView to show a view of the User's profile, but am not sure how to access the 'City' data. Everything works accept for that. Any help?select users.username AS 'User Name', users.firstname AS 'First Name', users.lastname AS 'Last Name', roles.rolename AS 'Role', AS 'Email', aspnet_Profile.City from users inner join aspnet_ProfileON users.userId = aspnet_Profile.UserId inner join userroles on users.userid = userroles.userid inner join roles on userroles.roleid = roles.roleid inner join aspnet_users on users.username = a...

Modifying user profile information
Hi,Does anyone have a step by step instruction for how to modify the user profile information. I would like to add some fields and remove some of the default (using DNN 3.1.1). Would like to understand what files and database fields requires to be updated.Many thanksNiclas  In the current implementation this would require you changing the info object, controller classes, along with the web.config and the register.ascx.  You could also write your own profile provider but that is no small task. Chris Paterra I believe that there is a thread going in the main DNN forum ...

Access profile information for a user
Hi - I am using .net2/VB, and have a party booking system. I store some additional info (address, postcode, fullname etc) in the Profile object for each user, so I can access it as the logged in user from code, such as tbAddress.text = profile.Address. If I log in with an admin type account, can I access the profile information for a specific user? eg. is there something like: Dim userprofile As ProfileUser = Profile.GetProfile(username) tbAddress.text = userprofile.Address Thanks for any help, Mark Try below code Dim user As MembershipUser = Membership.GetUser(username)Dim use...

Modify user profile information
Hi,I would like to modify the user profile information in the CSK and am struggling with how it all hangs together. Does somone have a step by step instruction for how to for example remove the ICQ field from the registration form ? I understand the database and stored procedures tasks, but need to understand the steps involved in changing the forms.Many thanksNiclas the plact to start would be in the solution explorer in visual studio go to comunitystarterkit/engine/framework/users/from there it sounds like you need to remove what you dont want from the following  .../components/prof...

could we add information to the User Profile ... ?
Hello, I'm developping a site with the Community Starter Kit, it is very usefull ! I just miss that we can't find the Birthday of a user in the current form. So I'd like to add this information for each user ... Is it possible ? because we don't have any access to the register form, don't we ? I was thinking of creating my own form and had these additionnal informations by my own, and store them in Community_Users table ... do you think it is possible and a good way ? is there any simple solution ? thanks a lot It should be rather simple to do this, though there are chang...

List of all users and their profile information
Hi there,Can anybody help me to get list of all users and their profile information ?Thanks a lot. ...

Extracting User Profile Information
This may seem real stupid....has anyone created any mods that help with extracting certain or all user profile information out from CSK as controls to say a text file? Minesh...

.Net 2.0 User Profiles
Hi all, Quick question:Does anyone know how well the .Net 2.0 user profiles framework scales to enterprise applications? Is it a valid building block for high visitor level sites? A million or so users? Does the community generally envisage using the profiles as a framework to build on for custom solutions?Any of your thoughts would be greatly appreciated!Thanks Ok, I have just written my own membership provider and will be doing the same for Profile and Role providers, I guess i'm answering my own post really... For those that haven't got to it yet, the default implementations that MS ...

Web resources about - User Profile Information -

Information - Wikipedia, the free encyclopedia
Information (shortened as info or info. ) is that which informs, i.e. an answer to a question, as well as that from which knowledge and data ...

InformationWeek – Latest Information Technology (IT) news & IT articles - Technology news - IT magazine ...
InformationWeek provides latest Information technology (IT) news online & articles and publishes latest tech news & IT magazine for Indian IT ...

US gave San Bernardino shooter Tashfeen Malik visa 'despite missing information'
A congressman claims the US approved an entry visa even though Malik never provided the extra evidence requested by an immigration official. ...

Trudeau says improving access to information will make government better
Ensuring Canadians have access to federal information will mean more and sometimes difficult public scrutiny, but ultimately it will lead to ...

Making Access To Information Better Will Make Improve Government, Trudeau Says 54
The Liberals will conduct a "proper review" of the decades-old Access to Information Act with the aim of figuring out "what is actually going ...

Martin Peers Promoted at The Information
The Information, the tech subscription site that was founded in 2013, has named Martin Peers managing editor. Peers most recently served as ...

Senate Intellicence Committee Chair Burr all but confirms that Cruz leaked classified information at ...
... that, among other things, updates the government’s program of collecting phone metadata. In doing so, Cruz probably leaked classified information. ...

Apple’s Maps app adds Los Angeles public transit information
Apple’s Maps application now supports public transit information for Los Angeles, California, forming a continuation of the service’s gradual ...

It's not exactly the Watergate break-in — is it? — but Bernie Sanders's campaign broke into Hillary Clinton's ...
... Democratic National Committee have accused the presidential campaign of Sen. Bernie Sanders of improperly accessing confidential voter information ...

U.S. Gave Malik Visa Despite Missing Information, Lawmaker Says
Bloomberg U.S. Gave Malik Visa Despite Missing Information, Lawmaker Says Bloomberg The U.S. approved an entry visa for Tashfeen Malik, one ...

Resources last updated: 12/24/2015 1:36:50 PM