Solved

Small db application for expense report

Posted on 2006-06-09
2
240 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
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
userCompare  challenge 3 62
for loop with Set 4 46
groupSum6 challenge 6 48
groovy example issue 10 70
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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 …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now