Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

Affordable ASP.NET Hosting Service
  Ads  
r2i.ntegrated
 


  Sponsors  

Meet Our Sponsors

The Official Microsoft ASP.NET Website
Portal Webhosting - Hosting For Developers
Red-Gate Software
MaximumASP
SourceGear - Tools for Developers
.: CounterSoft :.
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  User Defined Ta...  Creating a PK-FK Relationship Between the Users and UserDefinedData Tables
Previous Previous
 
Next Next
New Post 7/26/2008 6:46 PM
User is offline ajsansone
183 posts
www.graphicsphere.net/
9th Ranked


Creating a PK-FK Relationship Between the Users and UserDefinedData Tables 
Modified By ajsansone  on 7/26/2008 8:54:17 PM)

I'm working on an SQL Query that I'm trying to create a LEFT OUTER JOIN between the Users and UserDefinedData Tables below. The Users Table stores all Users that are registered even if they have not added a record in the UserDefinedData Table. The problem is that once a User adds a "record" in the UserDefinedData Table the User's Username is stored in the FieldValue and not in a Foreign Key Column.

 

In a relational database, you cannot meaningfully query two tables unless a PK-FK relationship exists between columns in the tables.  So, I think UDT needs to have a FK established before I can pursue creating queries that draw data from both tables. The final SQL Query I'm trying to create would list the username and email address of all users that have not added a record to the UserDefinedData Table.

 


Anthony John Sansone
Graphicsphere.Net, President
Palm Harbor, Florida, U.S.A.
http://www.graphicsphere.net
View Anthony J. Sansone's profile on LinkedIn
 
New Post 7/27/2008 4:51 AM
User is offline Sebastian Leupold
15057 posts
www.deutschnetnuke.de
1st Ranked












Re: Creating a PK-FK Relationship Between the Users and UserDefinedData Tables 

It is best practice for modules, to rely on data layer of the core framework, have a look into UDT 3.5.1, how user profile links are implemented to retrieve user display name for user profile links, createdby and changedby columns in business layer instead.

There is no need for a relationship (and NO option for a FK), because UDT stores its data serialized and the FK column is part of serialized data. Another problem arises from a mere structural situation: what shall happen, if a user is deleted? shall all records created, updated by him or referencing him be automatically deleted as well?

 


Sebastian Leupold

DeutschNetNuke dnnWerk - The DotNetNuke Experts German DotNetNuke User-Group

DotNetNuke Project UserDefinedTable
DotNetNuke Project Release Tracker
 
New Post 7/27/2008 10:15 AM
User is offline ajsansone
183 posts
www.graphicsphere.net/
9th Ranked


Re: Creating a PK-FK Relationship Between the Users and UserDefinedData Tables 

Not having a PK-FK relationship between the two tables means there is no way to join the two tables together in a relational database, right? Is there a way to connect the User Defined Table to automatically create a new UDT record every time a new user registers?


Anthony John Sansone
Graphicsphere.Net, President
Palm Harbor, Florida, U.S.A.
http://www.graphicsphere.net
View Anthony J. Sansone's profile on LinkedIn
 
New Post 7/27/2008 10:36 AM
User is offline Sebastian Leupold
15057 posts
www.deutschnetnuke.de
1st Ranked












Re: Creating a PK-FK Relationship Between the Users and UserDefinedData Tables 

Anthony, you do not need a relation for a join operation, however the join might be executed faster on FK relations. The main intention on FK relations is preventing records without an appropriate master record, i.e. a user defined row w/o an existing module, and remove child record when master is deleted.

Please be aware, that UDT is not a replacement for all custom module development, any event that shall trigger an action needs to be implemented in a custom module.


Sebastian Leupold

DeutschNetNuke dnnWerk - The DotNetNuke Experts German DotNetNuke User-Group

DotNetNuke Project UserDefinedTable
DotNetNuke Project Release Tracker
 
New Post 7/28/2008 9:59 AM
User is offline ajsansone
183 posts
www.graphicsphere.net/
9th Ranked


Re: Creating a PK-FK Relationship Between the Users and UserDefinedData Tables 

Any time frame on when the new UDT module will be released that includes limiting the number of records a user is allowed to add?


Anthony John Sansone
Graphicsphere.Net, President
Palm Harbor, Florida, U.S.A.
http://www.graphicsphere.net
View Anthony J. Sansone's profile on LinkedIn
 
Previous Previous
 
Next Next
  Forum  DotNetNuke® Pro...  User Defined Ta...  Creating a PK-FK Relationship Between the Users and UserDefinedData Tables
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


DNN Photo Gallery
Complete Photo Gallery Management!
www.dnnPhotoGallery.com
R2i - Delivering Serious DNN Services & Solutions
Award Winning Design, Skin construction, Custom Modules and Consulting Services for the Enterprise organization. R2i is the DNN:Map module Project Lead and one of the largest DNN service providers with offices in New York City, Virginia and Baltimore.
www.bi4ce.com
"SalarO" Skinning Graphic Design Branding Services
SalarO develops packaged & custom skins for your DNN at prices you can afford. SalarO is also developing Module development, Hosting, Branding/Logo design as well as Content Transfer Services to complement the core skinning solutions.
www.salaro.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP