Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!rice!uw-beaver!zephyr.ens.tek.com!tektronix!sequent!jsc From: jsc@sequent.UUCP (J. Scott Carr) Newsgroups: comp.databases Subject: Re: How do you name table/structure elements? Message-ID: <27911@sequent.UUCP> Date: 18 Jan 90 03:53:37 GMT References: <1990Jan16.170217.16718@aqdata.uucp> <27885@sequent.UUCP> <44255@wlbr.IMSD.CONTEL.COM> Reply-To: jsc@crg4.UUCP (J. Scott Carr) Organization: Sequent Computer Systems, Inc Lines: 32 In article <44255@wlbr.IMSD.CONTEL.COM> mh@awds26.UUCP (Mike Hoegeman) writes: >>In article <1990Jan16.170217.16718@aqdata.uucp> sullivan@aqdata.uucp (Michael T. Sullivan) writes: >> >>My preference is to prepend text that identifies the object the >>column belongs to. The intention is that the core of the field name >>represents the attribute, the prefix the object. This is most important >>with keys. For example, part number in a parts table and a orders table >>are the same attribute. Naming the columns PRT_PARTNO and ORD_PARTNO >>helps clarify complex selects and joins, as well as the data dictionary. >> I know, I'm responding to my own response, but . . . well . . . I've been swayed. Mike Hoegeman made a good point about database browsing. If you take the browsing of database system tables, knowing that whenever you look for a table name, the column will be TABLE_NAME, improves the access- abliity of the data, as well as removing some of the mystery around the tables, which drops another barrier to information retrieval. So I see a good case for standard naming of attributes in a data schema. My initial opinion was formed on a project using a DBMS in which unique column names had a significantly positive effect on query performance. Has anyone had experience on this? The other factor that encouraged the prefix on columns was to identify primary and foriegn keys. As referential integrity becomes a part of table definitions, this requirement is met by the DBMS. How do others handle identifying to users and data administrators which are key fields? DBMS integrity features, column naming, NOT NULL attributes? Comments on these issues would be appreciated. -------- Scott Carr uunet!sequent!jsc Sequent Computer Systems (503) 526-5940