?
Solved

Small db application for expense report

Posted on 2006-06-09
2
Medium Priority
?
247 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 100 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 400 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
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…
Progress

752 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