User ownership of a specific data row?
-
I am trying to give my user ownership of specific data row that they enter information into, but as well as allowing other users to view and select from. I mean the information will in the database will be able to be seen globally but can also have the information designated to that user. I am using asp.net C# and MS SQL Management Studios, can anyone help, I believe this will have to be in SQL.. Thanks Smile | I am trying to associate a Member with record that they created through a form that I have on the my site. I want the record to be associated with members profile as well as could be searched and selected by another member, but only a read only to this member who didn't create it but be able to select as part of his membership profile in a read only capacity. I have two tables, aspnet_Users and aspnet_Genealogy, the code for the two tables are as follows:
CREATE TABLE [dbo].[aspnet_Users] (
[ApplicationId] UNIQUEIDENTIFIER NOT NULL,
[UserId] UNIQUEIDENTIFIER DEFAULT (newid()) NOT NULL,
[UserName] NVARCHAR (256) NOT NULL,
[LoweredUserName] NVARCHAR (256) NOT NULL,
[MobileAlias] NVARCHAR (16) DEFAULT (NULL) NULL,
[IsAnonymous] BIT DEFAULT ((0)) NOT NULL,
[LastActivityDate] DATETIME NOT NULL,
CONSTRAINT [PK__aspnet_U__1788CC4D0BC6C43E] PRIMARY KEY NONCLUSTERED ([UserId] ASC)
);GO
CREATE UNIQUE CLUSTERED INDEX [aspnet_Users_Index]
ON [dbo].[aspnet_Users]([ApplicationId] ASC, [LoweredUserName] ASC);GO
CREATE NONCLUSTERED INDEX [aspnet_Users_Index2]
ON [dbo].[aspnet_Users]([ApplicationId] ASC, [LastActivityDate] ASC);CREATE TABLE [dbo].[aspnet_Genealogy] (
[GenealogyId] INT IDENTITY (1, 1) NOT NULL,
[FamilyName] CHAR (200) NOT NULL,
[FirstName] CHAR (200) NULL,
[MiddleName1] CHAR (200) NULL,
[MiddleName2] CHAR (200) NULL,
[MiddleName3] CHAR (200) NULL,
[Gender] CHAR (10) NULL,
[DOB] VARCHAR (20) NOT NULL,
[COB] CHAR (200) NULL,
[SOB] CHAR (200) NULL,
[COOB] CHAR (200) NULL,
[Newsletter] CHAR (10) NULL,
[DateTimeGenealogy] DATETIME NOT NULL,
[UserId] UNIQUEIDENTIFIER NULL,
PRIMARY KEY CLUSTERED ([GenealogyId] ASC),
CONSTRAINT [FK_aspnet_Genealogy_aspnet_Users] FOREIGN KEY ([ -
I am trying to give my user ownership of specific data row that they enter information into, but as well as allowing other users to view and select from. I mean the information will in the database will be able to be seen globally but can also have the information designated to that user. I am using asp.net C# and MS SQL Management Studios, can anyone help, I believe this will have to be in SQL.. Thanks Smile | I am trying to associate a Member with record that they created through a form that I have on the my site. I want the record to be associated with members profile as well as could be searched and selected by another member, but only a read only to this member who didn't create it but be able to select as part of his membership profile in a read only capacity. I have two tables, aspnet_Users and aspnet_Genealogy, the code for the two tables are as follows:
CREATE TABLE [dbo].[aspnet_Users] (
[ApplicationId] UNIQUEIDENTIFIER NOT NULL,
[UserId] UNIQUEIDENTIFIER DEFAULT (newid()) NOT NULL,
[UserName] NVARCHAR (256) NOT NULL,
[LoweredUserName] NVARCHAR (256) NOT NULL,
[MobileAlias] NVARCHAR (16) DEFAULT (NULL) NULL,
[IsAnonymous] BIT DEFAULT ((0)) NOT NULL,
[LastActivityDate] DATETIME NOT NULL,
CONSTRAINT [PK__aspnet_U__1788CC4D0BC6C43E] PRIMARY KEY NONCLUSTERED ([UserId] ASC)
);GO
CREATE UNIQUE CLUSTERED INDEX [aspnet_Users_Index]
ON [dbo].[aspnet_Users]([ApplicationId] ASC, [LoweredUserName] ASC);GO
CREATE NONCLUSTERED INDEX [aspnet_Users_Index2]
ON [dbo].[aspnet_Users]([ApplicationId] ASC, [LastActivityDate] ASC);CREATE TABLE [dbo].[aspnet_Genealogy] (
[GenealogyId] INT IDENTITY (1, 1) NOT NULL,
[FamilyName] CHAR (200) NOT NULL,
[FirstName] CHAR (200) NULL,
[MiddleName1] CHAR (200) NULL,
[MiddleName2] CHAR (200) NULL,
[MiddleName3] CHAR (200) NULL,
[Gender] CHAR (10) NULL,
[DOB] VARCHAR (20) NOT NULL,
[COB] CHAR (200) NULL,
[SOB] CHAR (200) NULL,
[COOB] CHAR (200) NULL,
[Newsletter] CHAR (10) NULL,
[DateTimeGenealogy] DATETIME NOT NULL,
[UserId] UNIQUEIDENTIFIER NULL,
PRIMARY KEY CLUSTERED ([GenealogyId] ASC),
CONSTRAINT [FK_aspnet_Genealogy_aspnet_Users] FOREIGN KEY ([One way of implementing this would be to create a view with a "where clause" that restricts the rows returned to the specific user. You would then grant "select" access to only those views, not directly to the tables themselves. Just a thought. Remember to vote. :)
-
One way of implementing this would be to create a view with a "where clause" that restricts the rows returned to the specific user. You would then grant "select" access to only those views, not directly to the tables themselves. Just a thought. Remember to vote. :)
Do you think this would work: I have to views, for two tables, aspnet_Users and aspnet_Genealogy I have the views already connect to the username which would the login, it shows all users with the one test data row which is the only entry at this point in time. Now would this "where clause" work,
UPDATE aspnet_genealogy
SET FamilyName, FirstName, MiddleName1
WHERE UserName=LoginStatus1;and then a select,
SELECT UserName, FamilyName, FirstName, MiddleName1
FROM aspnet_Genealogy;Do you think this would work? Thanks
-
One way of implementing this would be to create a view with a "where clause" that restricts the rows returned to the specific user. You would then grant "select" access to only those views, not directly to the tables themselves. Just a thought. Remember to vote. :)
I am trying to give my user ownership of specific data row that they enter information into, but as well as allowing other users to view and select from. I mean the information will in the database will be able to be seen globally but can also have the information designated to that user. I am using asp.net C# and MS SQL Management Studios, can anyone help, I believe this will have to be in SQL.. Thanks Smile | I am trying to associate a Member with record that they created through a form that I have on the my site. I want the record to be associated with members profile as well as could be searched and selected by another member, but only a read only to this member who didn't create it but be able to select as part of his membership profile in a read only capacity. I have two tables, aspnet_Users and aspnet_Genealogy, the code for the two tables are as follows:
CREATE TABLE [dbo].[aspnet_Users] (
[ApplicationId] UNIQUEIDENTIFIER NOT NULL,
[UserId] UNIQUEIDENTIFIER DEFAULT (newid()) NOT NULL,
[UserName] NVARCHAR (256) NOT NULL,
[LoweredUserName] NVARCHAR (256) NOT NULL,
[MobileAlias] NVARCHAR (16) DEFAULT (NULL) NULL,
[IsAnonymous] BIT DEFAULT ((0)) NOT NULL,
[LastActivityDate] DATETIME NOT NULL,
CONSTRAINT [PK__aspnet_U__1788CC4D0BC6C43E] PRIMARY KEY NONCLUSTERED ([UserId] ASC)
);GO
CREATE UNIQUE CLUSTERED INDEX [aspnet_Users_Index]
ON [dbo].[aspnet_Users]([ApplicationId] ASC, [LoweredUserName] ASC);GO
CREATE NONCLUSTERED INDEX [aspnet_Users_Index2]
ON [dbo].[aspnet_Users]([ApplicationId] ASC, [LastActivityDate] ASC);CREATE TABLE [dbo].[aspnet_Genealogy] (
[GenealogyId] INT IDENTITY (1, 1) NOT NULL,
[FamilyName] CHAR (200) NOT NULL,
[FirstName] CHAR (200) NULL,
[MiddleName1] CHAR (200) NULL,
[MiddleName2] CHAR (200) NULL,
[MiddleName3] CHAR (200) NULL,
[Gender] CHAR (10) NULL,
[DOB] VARCHAR (20) NOT NULL,
[COB] CHAR (200) NULL,
[SOB] CHAR (200) NULL,
[COOB] CHAR (200) NULL,
[Newsletter] CHAR (10) NULL,
[DateTimeGenealogy] DATETIME NOT NULL,
[UserId] UNIQUEIDENTIFIER NULL,
PRIMARY KEY CLUSTERED ([GenealogyId] ASC),
CONSTRAINT [FK_aspnet_Genealogy_aspnet_Users] FOREIGN KEY ([ -
I am trying to give my user ownership of specific data row that they enter information into, but as well as allowing other users to view and select from. I mean the information will in the database will be able to be seen globally but can also have the information designated to that user. I am using asp.net C# and MS SQL Management Studios, can anyone help, I believe this will have to be in SQL.. Thanks Smile | I am trying to associate a Member with record that they created through a form that I have on the my site. I want the record to be associated with members profile as well as could be searched and selected by another member, but only a read only to this member who didn't create it but be able to select as part of his membership profile in a read only capacity. I have two tables, aspnet_Users and aspnet_Genealogy, the code for the two tables are as follows:
CREATE TABLE [dbo].[aspnet_Users] (
[ApplicationId] UNIQUEIDENTIFIER NOT NULL,
[UserId] UNIQUEIDENTIFIER DEFAULT (newid()) NOT NULL,
[UserName] NVARCHAR (256) NOT NULL,
[LoweredUserName] NVARCHAR (256) NOT NULL,
[MobileAlias] NVARCHAR (16) DEFAULT (NULL) NULL,
[IsAnonymous] BIT DEFAULT ((0)) NOT NULL,
[LastActivityDate] DATETIME NOT NULL,
CONSTRAINT [PK__aspnet_U__1788CC4D0BC6C43E] PRIMARY KEY NONCLUSTERED ([UserId] ASC)
);GO
CREATE UNIQUE CLUSTERED INDEX [aspnet_Users_Index]
ON [dbo].[aspnet_Users]([ApplicationId] ASC, [LoweredUserName] ASC);GO
CREATE NONCLUSTERED INDEX [aspnet_Users_Index2]
ON [dbo].[aspnet_Users]([ApplicationId] ASC, [LastActivityDate] ASC);CREATE TABLE [dbo].[aspnet_Genealogy] (
[GenealogyId] INT IDENTITY (1, 1) NOT NULL,
[FamilyName] CHAR (200) NOT NULL,
[FirstName] CHAR (200) NULL,
[MiddleName1] CHAR (200) NULL,
[MiddleName2] CHAR (200) NULL,
[MiddleName3] CHAR (200) NULL,
[Gender] CHAR (10) NULL,
[DOB] VARCHAR (20) NOT NULL,
[COB] CHAR (200) NULL,
[SOB] CHAR (200) NULL,
[COOB] CHAR (200) NULL,
[Newsletter] CHAR (10) NULL,
[DateTimeGenealogy] DATETIME NOT NULL,
[UserId] UNIQUEIDENTIFIER NULL,
PRIMARY KEY CLUSTERED ([GenealogyId] ASC),
CONSTRAINT [FK_aspnet_Genealogy_aspnet_Users] FOREIGN KEY ([Member 9142936 wrote:
Can any one help?
Does the user need to be the physical owner of the data? That implies that each potential owner is in the AD. Does the user need to be "owner" in order to "not show" the data to other people besides the user?
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]
-
Member 9142936 wrote:
Can any one help?
Does the user need to be the physical owner of the data? That implies that each potential owner is in the AD. Does the user need to be "owner" in order to "not show" the data to other people besides the user?
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]
The user/member that enter the data thru the Default.aspx will be the "Owner", that means it automatically becomes part of his profile. I want that same data to be shown to other Users/Members, on a global basis but they can not edit the information, only select the data to become of their profile. Thanks for your quick response and look forward to hearing from you soon. Thanks
-
The user/member that enter the data thru the Default.aspx will be the "Owner", that means it automatically becomes part of his profile. I want that same data to be shown to other Users/Members, on a global basis but they can not edit the information, only select the data to become of their profile. Thanks for your quick response and look forward to hearing from you soon. Thanks
Member 9142936 wrote:
The user/member that enter the data thru the Default.aspx will be the "Owner",
That means that he doesn't need to "own" the data; he just needs access.
Member 9142936 wrote:
I want that same data to be shown to other Users/Members, on a global basis but they can not edit the information,
There's still no need to mess around with ownerships. Simply don't provide an update-page if the user is viewing a record that he didn't enter.
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]
-
Member 9142936 wrote:
The user/member that enter the data thru the Default.aspx will be the "Owner",
That means that he doesn't need to "own" the data; he just needs access.
Member 9142936 wrote:
I want that same data to be shown to other Users/Members, on a global basis but they can not edit the information,
There's still no need to mess around with ownerships. Simply don't provide an update-page if the user is viewing a record that he didn't enter.
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]
I agree if we look at from that point, the question I need to ask is since the default.aspx is the actual membership/user profile to start his family tree. Would it cause a problem since it is not classified on a ownership basis to the User/Member? The next step would be adding to the tree, (example: mother, father, maternal Grandfather and etc), I just want to make sure that the first data entry of the User/membership has a ownership and all other user/member will be able this data record can added on to another User/Member as part of their family tree profile. The procedures for the User/member to start, are as follow: Step1: User/Member register. Register.aspx - done Step2: Email sent to new user/member, Confirm.aspx - done Step3: New User/Member confirm the link thru email confirmLink.aspx - done Step4: New User/Member login in to website, login.aspx - done Step5: New user/member starts building his Genealogy Tree, (user/member profile begins), default.aspx - done, this is user/member actual information. Step6: Add to the genealogy tree, search the genealogy data table, aspnet_Genealogy, for instant Macdonald, a list of macdonald as a result, SearchResults.aspx, not done, with a select link, the User/Member takes ownership of the data record as part of his/her profile, but at the time the record can be claimed by another User/member. This is what I am trying to accomplish, will that cause problems with the ownership of my user/members in future data record entries and data ownership for other user/member. Thanks for your quick response and look forward to hearing from you in the future. regards
-
I agree if we look at from that point, the question I need to ask is since the default.aspx is the actual membership/user profile to start his family tree. Would it cause a problem since it is not classified on a ownership basis to the User/Member? The next step would be adding to the tree, (example: mother, father, maternal Grandfather and etc), I just want to make sure that the first data entry of the User/membership has a ownership and all other user/member will be able this data record can added on to another User/Member as part of their family tree profile. The procedures for the User/member to start, are as follow: Step1: User/Member register. Register.aspx - done Step2: Email sent to new user/member, Confirm.aspx - done Step3: New User/Member confirm the link thru email confirmLink.aspx - done Step4: New User/Member login in to website, login.aspx - done Step5: New user/member starts building his Genealogy Tree, (user/member profile begins), default.aspx - done, this is user/member actual information. Step6: Add to the genealogy tree, search the genealogy data table, aspnet_Genealogy, for instant Macdonald, a list of macdonald as a result, SearchResults.aspx, not done, with a select link, the User/Member takes ownership of the data record as part of his/her profile, but at the time the record can be claimed by another User/member. This is what I am trying to accomplish, will that cause problems with the ownership of my user/members in future data record entries and data ownership for other user/member. Thanks for your quick response and look forward to hearing from you in the future. regards
Member 9142936 wrote:
Would it cause a problem since it is not classified on a ownership basis to the User/Member?
You'd really need to explain what you mean with ownership; it's an ambiguous term, and it sounds more complicated than need be. Some user enters "data" on a public website. Fine - who is the owner? And is the owner actually "owner" in terms of system administration? FWIW, it sounds as if you're simply talking about a user and his data; like you'd be with a FaceBook account. The one who stores his/her info has read/write access, and there's some public view.
Member 9142936 wrote:
the User/Member takes ownership of the data record
No. You do not "own" the records of the database of your local bank or your doctor. It's their data. Yes, you may be given a read-only view of their data - with some rights to personalize things like your password and your avatar, but that's it. Having you as a physical "owner" of the record would complicate things significantly.
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]
-
Member 9142936 wrote:
Would it cause a problem since it is not classified on a ownership basis to the User/Member?
You'd really need to explain what you mean with ownership; it's an ambiguous term, and it sounds more complicated than need be. Some user enters "data" on a public website. Fine - who is the owner? And is the owner actually "owner" in terms of system administration? FWIW, it sounds as if you're simply talking about a user and his data; like you'd be with a FaceBook account. The one who stores his/her info has read/write access, and there's some public view.
Member 9142936 wrote:
the User/Member takes ownership of the data record
No. You do not "own" the records of the database of your local bank or your doctor. It's their data. Yes, you may be given a read-only view of their data - with some rights to personalize things like your password and your avatar, but that's it. Having you as a physical "owner" of the record would complicate things significantly.
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]
I am sorry that I was not clear, what I am trying to do is I have a register user who is building a personal family tree, when the user registers, (this is complete), the user creates a password and username, after the user register he taken to a default page where the user starts entering data to build his tree. At this point in time the user can enter the data but he can not save it to his personal tree, that what I mean by ownership. I want the user to be able to build the family tree by entering, saving and search the information in the database, it is a genealogy database. The Username and password is his personal genealogy tree in the database, that is what I call ownership of the personal genealogy tree. Can you help me with this ownership part, I look forward to hearing from you and thank you for your patience, I am fairly new to this. Thanks ;) ;) ;)