If quantities are always going to be integer (not decimal like 20.345 kgs), I'd go for integers there. Same for invoice numbers. Integers are good for surrogate keys. You can use bit for yes/no fields (logical in VFP). I'd leave N(n) for dollar amounts, percentages or anything that uses decimals. Check the literature or SQL BOL for definitions on integers in SQL. No point in using big int if you can do with small int or tiny int. Performance, space, future table growth considerations should help you in your decision.
Rafael Copquin El 08/09/2010 2:19, Matt Slay escribió: > I have several DBF tables where that I designed YEARS ago where I frequently > used a lot of N(3) or N(5) field definitions, and somewhere along the way > over the years, I started using simple Integer fields, which I kind of like > better now, just because it seems more flexible and less rigid. It seems > like your always taking a guess and limiting yourself when using N(x) field > definitions. For example: using N(3) for an OrderQty field just because you > assume no customer will ever order more than 999 copies of your booklet. Who > knows, maybe someone will order 1,000 or even 10,000 one day. > > Now I am hoping to soon Upsize my tables to Sql Server, and I'm kind of > tempted to just go ahead and switch all the N(3) and N(5) over to Integer > fields before I do and just be done with it. > > Are there any pros or cons to my "old way" vs. my new plan to just use > Integer fields everywhere? > > Also, I know that Sql Server has other Int options too, like "Small Int" and > "Tiny Int". Seems tempting, but we don't have that in VFP, and I really > want to do all my schema changes in VFP as much as I can before I push it > over. > > By the way, most of the tables have less that 50,000 records, but a few have > about 400,000 records. > > [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[email protected] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

