Solved

Small db application for expense report

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

A short article about problems I had with the new location API and permissions in Marshmallow
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
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…

813 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

12 Experts available now in Live!

Get 1:1 Help Now