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  |  

AppTheory specializes in solutions based on the DotNetNuke platform and has 2 employees on the DotNetNuke Core Team.
  Ads  
Engage Software - Training Partner for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

Jango Studios - Skins, Modules and Hosting for DotNetNuke
eUKhost.com is commited to offer exceptional UK Windows Web Hosting solutions with quality 24x7 technical support.Our plans support ASP.Net, ASP, ASP.NET Ajax extensions, XML, MSSQL, MySQL, PHP,DNN, multiple domains and Shared SSL as standard.
SmarterTools
The Official Microsoft ASP.NET Website
Portal Webhosting - Hosting For Developers
Red-Gate Software
 


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
15045 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
15045 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.

 


MaximumASP
MaximumASP provides a wide array of web hosting plans to fit any hosting need. We also provide software and services needed to keep it running optimally.
MaximumASP.com
Mad Development: dotnetnuke design and development
We are an expert Dotnetnuke shop specializing in developing solutions that merge the requirements of design and branding, content management, ecommerce, search engine optimization and business logic.
www.MadDevelopment.com
telerik
telerik r.a.d.controls suite is the most innovative and comprehensive toolset for ASP.NET development, tailored for seamless integration with the DotNetNuke project. This integrated collection of controls allows professionals to build web-solutions with the UI richness and responsiveness of desktop applications.
dnn.telerik.com

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