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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Module SQL design questionModule SQL design question
Previous
 
Next
New Post
6/28/2006 2:28 PM
 

Could anyone advise me if I did it right or wrong, and if wrong, suggest me a better solution.
I have six main tables that go hierarchically one under another (like MAIN_1...MAIN_6). MAIN_6 has a FK that references MAIN_5, which has FK that references MAIN_4, and so on. There are a few tables that are alongside the main tables (like SIDE_1...SIDE_4) SIDE_1 and SIDE_2 both have FK that references MAIN_1, SIDE_3 has FK that references MAIN_3, and SIDE_4 has FK that references MAIN_6. All these I have set to Cascade Update and Cascade Delete.

Then I have twenty list tables (like LIST_01...LIST_20). These are serving just to contain a list items in them, and they are related to all MAIN and SIDE tables (where MAIN or SIDE tables have FK that reference LIST tables). Most of them are linked to MAIN_6, and I have four lists that are used in thirty related fields in MAIN_6 (10, 10, 5, and 5; like fields Option_01...Option_10 are referencing List_01_ID in LIST_01; Color_01...Color_05 are referencing List_03_ID in LIST_03; PercentageOption_01...PercentageOption_10 and PercentageColor_01...PercentageColor_05 are referencing List_01_ID in LIST_02). I set all the lists to Cascade Update, except the first three lists, since SQL was throwing errors at me (like, 'MAIN_01' table - Unable to create relationship 'FK_MAIN_01_LIST_01_Option_02'. ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Introducing FOREIGN KEY constraint 'FK_MAIN_01_LIST_01_Option_02' on table 'MAIN_01' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints. [Microsoft][ODBC SQL Server Driver][SQL Server]Could not create constraint. See previous errors.)

The reasoning behind having lists is to keep the database from bloating (keep the size down) by using field IDs, which are ints, as relationship keys. In other words, if LIST_03 has entries of 'Black', 'White', 'Red', 'Blue', 'Green', with IDs of '1', '2', '3', '4', '5', and I select White, the entry in MAIN_6 for the related field will be '2' in each record (where it's selected) as oppose to 'White' repeating many times in various records.

Of course I scripted the whole table creation and primary key selection, then went to Enterprise Manager and created all the FKeys and saved the change script to the file so I could add it to the '01.00.00.SqlDataProvider' file.

Once I'm completely done with the scripting of tables and relationships, I should start working on scripting procedures, and then start working on a module code (in VB.Net and for DNN 4.0).

I'm trying to learn the module thing the hard way, but I figured if I can nail it down -- I will have learned alot. Could anyone, also, suggest any tutorials for building modules (DNN 4.0 specific based on .Net v2.0), which are walking you step by step through the process and explaining each step thoroughly. The best of course would be video tutorials, but all I can find are for DNN 3.0, which is based on .Net v1.1.

I'm working with VS2005.

Thanks in advance,

Waldis

 
New Post
6/28/2006 2:41 PM
 

that's some module you are making...;)

Michael Washington did a great tutorial on dnn 4 module creation: http://adefwebserver.com/DotNetNukeHELP/DNN_Module4/

cheers,

Erik


Erik van Ballegoij, Former DNN Corp. Employee and DNN Expert

DNN Blog | Twitter: @erikvb | LinkedIn: Erik van Ballegoij on LinkedIn

 
New Post
6/28/2006 6:26 PM
 

Thanks, Erik! I did go through that post, and it's a great one, but I need something that's beyond one page form. There is another one he did for DNN 4.3 or higher: http://www.adefwebserver.com/DotNetNukeHELP/DNN_Things4Sale/

I will need to have like six or more forms that link together forcing a user to go in a certain order without skipping the fields that are required; then I will need to have some admin side forms, like entering the values for lists and such. I'm still unclear on how to put all this in one module. I'm having trouble finding information.

And on my SQL DB table structure:

1. do I design them the right way,

2. am I right by assigning all the FKeys within the script (since all the other sql files from different modules seem not to have any FKeys, unless I'm missing something),

3. do I need to link my list tables to the main tables by IDs, or should I link them to insert the actual string and forget about conserving space issue, or do I need to link them at all (just pull the value from the list tables within the vb code and put them where I need)

Thanks,

Waldis ...

 
New Post
6/29/2006 9:00 AM
 

I suggest you study the Module definition configuration of the Event's module in 4.3

It's complex enough to show what you want, and simple enough to understand it

Watch how the Key and Type property varry between different *forms*

Then read about the functions NavigateURL and EditURL in the module developers guide

You should be able to see how it all fit's togheter

 

 

When you still have trouble, don't hesitate to post the code that bothers you on this forum. The experienced module developers will see in an instance what you did wrong.


Edit your Skin.xml and Container.xml files with:
Yannick's SXE
 
New Post
7/4/2006 1:47 AM
 

Actually I found the Blog and Repository modules to be the best at learning two fundemental ways of building a complex module.  My first module had 14 tables, 57 stored procedures, 32 ascx controls, and am still going (a reporting section- and it is made up of 3 module folders - like the repository/dashboard).  I'm still not done - and floundered for the longest time until I studied those. 

The events module was still a simple module - even though it had different controls, the blog, forum and repository helped me grasp the interplay of multiple controls per definition (few definitions using a controller) vs. fixed # controls per definition and several definitions - that all get placed on the page at once.  That was the key - adding several controls to one container on a page at once (like the Blog) - which I used for master data entry and control, or a set module control added with multiple views (I used this for the transactional data and reporting modules) - like the repository or forum modules. 

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Module SQL design questionModule SQL design question


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