Solved

Small db application for expense report

Posted on 2006-06-09
2
245 Views
Last Modified: 2010-04-17
Hi,

I have to create a small db application for expense report. I have 2 tables for now: User and Expense Report

One of the attribute of an expense report is status (pending, approved, failed, etc..). My question is "should I create another table called statusTable?" or "should I just create a enumeration in the code for status"?

Thanks
0
Comment
Question by:TungVan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Assisted Solution

by:EECDML
EECDML earned 25 total points
ID: 16869787
Depending on what type of database system you're using, I'd use a TINYINT/Byte field (up to 255), this will be the easiest for coding it.

The only thing enumeration is good for is the ease of viewing the database in its raw table form, but since it is going to have a front-end, the code can just interpret a number, eg. 1=pending, 2=approved, 3=failed; and there is room for another 200+ values.

Hope that helps.
0
 
LVL 6

Accepted Solution

by:
AHMKC1 earned 100 total points
ID: 16870055
My suggestion is that if your status values are fixed then you use coding

But if your status values are not fixed and you will want to Add or Removed status then you create another table

Thanks
0

Featured Post

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question