Solved

Small db application for expense report

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
egit plugin on eclipse 8 98
What are programming codes and how do they work? 7 112
Bot application - advice 3 60
statistics basics sources 2 38
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
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.
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…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

756 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