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 Two Fields that aren't *Quite* the Same
I have two tables ([tblBook] and [tblBook_Ext]) with the same number of
fields. One of the tables ([tblBook_Ext]) is updated by an external source. Then I bring these two tables together in a query, join them using their keys ([ISBN]), and compare their fields ([Title], [Author], [Binding], etc.). My question is a practical and a philosophical one: should these fields share the same name, if they don't necessarily share the same values? Or should I name them something like [Title] And [TitleExt]? -- Yo Yo Ma. |
#2
|
|||
|
|||
Naming Two Fields that aren't *Quite* the Same
naming conventions are a combination of what works and what makes sense to
you; the general guideline is to be consistent in whatever naming convention you choose to use. personally, i never name any two fields in a database exactly the same. in your situation, since you are specifically using a comparison query on the two tables, you may find it easier and less confusing to name the "matching" fields in the two tables the same, then add a common prefix or suffix to the name of each field in at least one of the two tables. that way, can easily identify which table a particular field belongs to - and also what the field's "mirror" field is, in the other table. hth "Murp" wrote in message ... I have two tables ([tblBook] and [tblBook_Ext]) with the same number of fields. One of the tables ([tblBook_Ext]) is updated by an external source. Then I bring these two tables together in a query, join them using their keys ([ISBN]), and compare their fields ([Title], [Author], [Binding], etc.). My question is a practical and a philosophical one: should these fields share the same name, if they don't necessarily share the same values? Or should I name them something like [Title] And [TitleExt]? -- Yo Yo Ma. |
#3
|
|||
|
|||
Naming Two Fields that aren't *Quite* the Same
Murp wrote: I have two tables ([tblBook] and [tblBook_Ext]) with the same number of fields. One of the tables ([tblBook_Ext]) is updated by an external source. Then I bring these two tables together in a query, join them using their keys ([ISBN]), and compare their fields ([Title], [Author], [Binding], etc.). My question is a practical and a philosophical one: should these fields share the same name, if they don't necessarily share the same values? I think the column names should be the same in each table because they derive from the same domain (books). In your data dictionary they may have different class names e.g. external_book_title_value internal_book_title_value When it comes to implementation, the class name is generally reflected in the table name e.g. CREATE TABLE ExternalBooks ( ISBN CHAR(10) NOT NULL PRIMARY KEY, title VARCHAR (70) NOT, ... ); CREATE TABLE InternalBooks ( ISBN CHAR(10) NOT NULL PRIMARY KEY, title VARCHAR (70) NOT, ... ); Jamie. -- |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Updating fields and links before printing ... | Sharon M. | General Discussion | 6 | May 7th, 2006 11:58 PM |
Return all Fields Except Memo Fields | Greg | Running & Setting Up Queries | 4 | April 19th, 2006 02:12 PM |
enable a field if a given field is checked off- otherwise- don't w | babs | Using Forms | 9 | April 18th, 2006 03:36 PM |
Invisible Multiple Fields in PageHeaders (Word 2003) | Roberto Villa Real | Mailmerge | 4 | September 24th, 2005 10:53 PM |
Sorting a table by concatenating several fields in the same table | salsaguy | Running & Setting Up Queries | 3 | March 6th, 2005 08:41 PM |