Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListCreating a PK-FK Relationship Between the Users and UserDefinedData TablesCreating a PK-FK Relationship Between the Users and UserDefinedData Tables
Previous
 
Next
New Post
7/26/2008 8:46 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.

 

 
New Post
7/27/2008 6:51 AM
 

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?

 


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
7/27/2008 12:15 PM
 

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?

 
New Post
7/27/2008 12:36 PM
 

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.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
7/28/2008 11:59 AM
 

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?

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListCreating a PK-FK Relationship Between the Users and UserDefinedData TablesCreating a PK-FK Relationship Between the Users and UserDefinedData Tables


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, 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 DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out