• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 339
  • Last Modified:

idea needed

Hi

I was asked to make a letter management system

there is a typist and he/she make the letter and put into the user and user review letter, if there is error user highlight error and adding comment and send letter back to typist

typist review comment and correct errors then send it back to user. user review it get print


is it a good idea to write every letter into a mysql database?
so whats the best way to do this?


Thanks
0
3xtr3m3d
Asked:
3xtr3m3d
2 Solutions
 
pius_babbunCommented:
Yep.You can store in database. But my suggestion would be to store it in a file and upload it to a specific folder and maintain the versions of the letters. This has many advantages than storing and updating to the database. Each time the file (Letter) is update the name of the file can be with version no.

Hope this idea helps in letters management. Analise if it is helpful to you
0
 
3xtr3m3dAuthor Commented:
Thanks for the idea.
0
 
owner66Commented:
I would store it all in a database with 2 tables, 1 table for the original letter, 1 table with revisions of letter.
This way you can have more available information such as date, and revision history easily accessible.
You can extend tables as needed.
Here is a very basic layout:

-- phpMyAdmin SQL Dump
-- version 3.3.9
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 20, 2011 at 02:00 PM
-- Server version: 5.5.8
-- PHP Version: 5.3.5

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `letters`
--

-- --------------------------------------------------------

--
-- Table structure for table `letter`
--

CREATE TABLE IF NOT EXISTS `letter` (
  `letterId` int(11) NOT NULL AUTO_INCREMENT,
  `letterTitle` text NOT NULL,
  `letterDate` datetime NOT NULL,
  `letterAuthor` text NOT NULL,
  `letterBlob` blob NOT NULL,
  PRIMARY KEY (`letterId`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `letter`
--


-- --------------------------------------------------------

--
-- Table structure for table `letterrevisions`
--

CREATE TABLE IF NOT EXISTS `letterrevisions` (
  `RevisionId` int(11) NOT NULL AUTO_INCREMENT,
  `letterId` int(11) NOT NULL,
  `revisionDate` datetime NOT NULL,
  `revisionLetter` blob NOT NULL,
  PRIMARY KEY (`RevisionId`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `letterrevisions`
--
0
 
vogenCommented:
How about implementing using xml and php
0
 
3xtr3m3dAuthor Commented:
Thanks for the ideas
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now