If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Naming fields & tables, spaces between text
Since I am VERY new to Access, I will start here in this NG.
In my textbook, they are using no spaces when creating field names, such as CustomerName. However, I've heard that it's good practice to use an underscore character between the names, such as Customer_Name. Is this true? What is good convention? Does this also apply to tables, such as tbl_Customer_List, instead of Customer List or CustomerList? Lastly, when (if ever) is it OK to put spaces in between text in your database? Like, if I had an entry in a Field called Address, it would normally read; 1250 Main Street, but are you supposed to make it without spaces, like 1250MainStreet, or 1250_Main_Street? Or if I had a Field called City, how should I put something like New Orleans? Would it be NewOrleans, or New_Orleans? IMO, it seems like it's easier to read when there's an underscore between the words. TIA. |
#2
|
|||
|
|||
Hi
welcome, this is a good place to start here's my understanding on how it all works .. others will probably pop in with their ideas ... basic database design convention says that object names (tables, fields, controls, forms, report, macro etc) names should not have spaces in them (and it does save typing time if you don't use spaces). DATA however, can, and should contain spaces. So the table CustomerDetails should have no spaces, nor should the field CustomerAddress however the actual address itself (the data) should be entered exactly the way you want to get it out (i.e. with spaces & commas & capitalisation etc). Now whether you prefer Customer_Details or CustomerDetails or Customerdetails (IMHO) is purely a matter of preference, personally i like the second option as it means i don't have to type a "_" The next convention you mention is that of the use of TBL in the table name .... it is recommended that when it comes to object types (tables, forms, reports, queries, macros etc) you use a prefix to indicate what type of object it is that you're working with. This does make it a bit easier if you have a table called CustomerDetails and a form also called CustomerDetails - TBL_CustomerDetails and FRM_CustomerDetails leave no room for confusion. Some people also affix the datatype to their field names (str_CustomerFirstName, dte_CustomerDateofBirth) but i don't go that far. However, i guess the bottom line is that you need to choose an approach that works for you and be consistent in that approach. You might like to check out http://www.mvps.org/access/tencommandments.htm (and some of the other things on that web site). Cheers JulieD "CAD Fiend" wrote in message ... Since I am VERY new to Access, I will start here in this NG. In my textbook, they are using no spaces when creating field names, such as CustomerName. However, I've heard that it's good practice to use an underscore character between the names, such as Customer_Name. Is this true? What is good convention? Does this also apply to tables, such as tbl_Customer_List, instead of Customer List or CustomerList? Lastly, when (if ever) is it OK to put spaces in between text in your database? Like, if I had an entry in a Field called Address, it would normally read; 1250 Main Street, but are you supposed to make it without spaces, like 1250MainStreet, or 1250_Main_Street? Or if I had a Field called City, how should I put something like New Orleans? Would it be NewOrleans, or New_Orleans? IMO, it seems like it's easier to read when there's an underscore between the words. TIA. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Concatenatd fields in a query for a searching form | Marc | Running & Setting Up Queries | 8 | October 19th, 2004 08:49 PM |
Spaces in fields names | Daniel | New Users | 2 | October 7th, 2004 10:20 PM |
Linked text boxes containing tables | Gary McGill | Page Layout | 3 | June 9th, 2004 11:57 PM |
Need help with Tables Design and Relationships | Tom | Database Design | 24 | May 19th, 2004 06:51 PM |
Text boxes-help | Jon Peltier | Charts and Charting | 0 | January 26th, 2004 05:46 PM |