MySQL
  Home arrow MySQL arrow Data Management Made Easy Using Nennius: Advanced Data Handling
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
MYSQL

Data Management Made Easy Using Nennius: Advanced Data Handling
By: Brian Vaughn
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 6
    2005-08-03


    Table of Contents:
  • Data Management Made Easy Using Nennius: Advanced Data Handling
  • Advanced Application Configuration
  • Expanding Our Application Menu
  • Creating the User Comments Component
  • Creating Component Dependencies
  • Component Notes
  • Help Files
  • File Attachments

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Data Management Made Easy Using Nennius: Advanced Data Handling
    ( Page 1 of 8 )

    Welcome to part three of this tutorial introducing application development for the Nennius engine. In this article, we will enhance the News Manager application from part two.

    Introduction

    This article is part three of an introduction to application development for the Nennius engine. If you have not yet read part one or two, you should do so before continuing. We will be enhancing the News Manager application (http://nennius.sourceforge.net/nennius/webapps/news/) already discussed in the previous tutorial, so you will need a copy of the source code (http://nennius.sourceforge.net/nennius/webapps/news.zip) for that application if you want to work along.

    Update Database

    Before we can start, we will once again need to run a few SQL queries to populate the application's database with the appropriate information. These queries simply build on top of the database created in part two:

    -- create table to hold news release file attachments (images in this case)

    CREATE TABLE `news_attachments` (

            `id` INT( 4 ) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT ,

            `news_id` INT( 3 ) UNSIGNED ZEROFILL NOT NULL ,

            `filename` VARCHAR( 50 ) NOT NULL ,

            PRIMARY KEY ( `id` ) ,

            INDEX ( `news_id` )

    );

    -- create table to hold record history (& associate to users & news tables via foreign keys)

    CREATE TABLE `news_history` (

            `id` INT( 4 ) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT ,

            `news_id` INT( 3 ) UNSIGNED ZEROFILL NOT NULL ,

            `user_id` INT( 2 ) UNSIGNED ZEROFILL NOT NULL ,

            `datetime` DATETIME NOT NULL ,

            `description` TEXT NOT NULL ,

            PRIMARY KEY ( `id` ) ,

            INDEX ( `news_id` , `user_id` )

    );

    -- create comments table to hold user comments

    CREATE TABLE `comments` (

            `id` INT( 10 ) UNSIGNED ZEROFILL NOT NULL ,

            `news_id` INT( 3 ) UNSIGNED ZEROFILL NOT NULL ,

            `datetime` DATETIME NOT NULL ,

            `name` VARCHAR( 50 ) NOT NULL ,

            `subject` VARCHAR( 100 ) NOT NULL ,

            `comment` TEXT NOT NULL ,

            PRIMARY KEY ( `id` ) ,

            INDEX ( `news_id` )

    );

    -- create notes table for moderators store private messages regarding user comments in

    CREATE TABLE `comment_notes` (

            `id` int(4) unsigned zerofill NOT NULL auto_increment,

            `news_id` int(3) unsigned zerofill NOT NULL default '000',

            `user_id` int(2) unsigned zerofill NOT NULL default '00',

            `datetime` datetime NOT NULL default '0000-00-0000:00:00',

            `description` text NOT NULL,

            PRIMARY KEY  (`id`),

            KEY `news_id` (`news_id`,`user_id`)

    );

    -- insert addition user record with threshold of USER for later use

    INSERT INTO `users` ( `id` , `username` , `password` , `name` , `email` , `threshold_id` )

            VALUES ( '', 'user', 'user', '', 'user@corporatewebsite.com', '03' );

    As you can see, we've created several additional SQL tables (which will be explained later in the article) as well as an additional user record; nothing too complex. Now we're ready to start modifying our application.



     
     
    >>> More MySQL Articles          >>> More By Brian Vaughn
     

       

    MYSQL ARTICLES

    - MySQL Security Tips
    - Designing a MySQL Database: Tips and Techniq...
    - The Three Most Important MySQL Queries
    - Null and Empty Strings
    - MySQL Server Tuning Tips and Tricks
    - MySQL Query Optimizations and Schema Design
    - MySQL Benchmarking Tools and Utilities
    - MySQL Benchmarking Concepts and Strategies
    - Take Some Load off MySQL with MemCached
    - MySQL Table Prefix Changer Tool in PHP
    - Using the SIGNAL Statement for Error Handling
    - Error Handling Examples
    - Error Handling
    - Completing a Search Engine with MySQL and PH...
    - Paginating Result Sets for a Search Engine B...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek