Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Field naming conventions in SQL
Message
From
07/12/2000 16:30:01
 
 
To
07/12/2000 11:22:20
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00450333
Message ID:
00450599
Views:
36
>Actually, I think this is a waste of time in xBase too. It makes sense with variables because xBase is weakly typed (meaning you can put any value into any variable), so a naming convention tells the developer what data type is expected in a variable. However, fields in tables are strongly typed, so there's no need to use a naming convention to tell you the expected data type; just look at the table structure.
>
>My 2 cents (and I'm guessing I'll hear some opposing opinions <g>).
>
>Doug

Here's a couple of reasons why I disagree with this:
1) The type identifying prefix will prevent reserved-word conflicts;
2) Type identifiers IMMEDIATELY identify the expected value of a column WITHOUT having to refer to the structure.

What makes this habit such a useful one is it greatly reduces the PITA factor in development, especially in multi-developer projects. Think of it as a self-documentation feature. In other words, I can read thru someone else's code and know fairly quickly what is being done without refering to an external document. Same goes for including a table reference (table.fieldname).
Dan LeClair
www.cyberwombat.com
SET RANT ON - The Wombat Blog

Life isn’t a morality contest and purity makes a poor shield. - J. Peter Mulhern
Disclaimer: The comments made here are only my OPINIONS on various aspects of VFP, SQL Server, VS.NET, systems development, or life in general, and my OPINIONS should not be construed to be the authoritative word on any subject. No warranties or degrees of veracity are expressed or implied. Void where prohibited. Side effects may included dizziness, spontaneous combustion, or unexplainable cravings for dark beer. Wash with like colors only, serve immediately for best flavor.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform