2

I have two statements to make:

  • Note that records are keyed on their name, not an integer
  • Note that records are uniquely identified by their name, not an integer

I considered combining these with the latter as a clarification in parentheses:

  • Note that records are keyed (uniquely identified) by their name, not an integer

I am not sure why, but the above combination sounds correct despite the fact that ignoring the parentheses would make the statement wrong.

Which is correct, if either?

(Sorry I don't know the terminology. This is slightly in the realm of computing where it may be made up, though I don't know how much impact that has on the language. I have heard equivalents of both these phrases be used in the industry.)

3
  • Is the "integer" (which you describe as NOT being used as a key) the record number? If so, say so. Commented Apr 10, 2015 at 10:30
  • @BrianHitchcock It seems likely that the intended audience would understand that an integer refers to the common practice of assigning an arbitrary ID number to records and using that as the key. The sentence is merely pointing out how this table varies from that practice.
    – Barmar
    Commented Apr 10, 2015 at 21:58
  • To me it sounds fine if you close with "not by an integer" but I don't know why. Commented Apr 10, 2015 at 22:29

2 Answers 2

1

The combined sentence seems OK to me.

The issue seems to be that keyed on and uniquely identified by are set phrases, and not really amenable to being broken up by parenthetical phrases. When you break up keyed on anyway, the requirement to use the associated preposition is lessened. Inserting uniquely identified there, even in parentheses, drags its associated preposition on with it. Although the normal rule for grammar is to ignore the parenthetical phrase, this seems like an exception because the choice of preposition is not really based on grammar, but just convention based on the phrase leading to it. When we read a sentence we still notice the parenthetical phrase.

A possible solution is to keep the prepositions in their phrases:

Note that records are keyed on (uniquely identified by) their name, not an integer.

But in practice I would just stick with one of your original sentences, as the audience will likely understand the meaning of keyed on and uniquely identified by, without needing the extra clarification.

2
  • No, just leave 'keyed on' - this is very clear to a database admin. When you say 'keyed' you imply the existence of other tables of which a single record is retrieved, whilst 'identified' refers to a single set of data, like one table in spreadsheets.
    – Oleksii
    Commented Apr 10, 2015 at 22:17
  • @javaNoobs Agreed. I've updated my answer to say that I think that's preferable.
    – Barmar
    Commented Apr 10, 2015 at 22:19
0

Usage depends on the scope, for example, if you describe a database structure, you say:

'Note that the records use name as unique key'

And you can not use 'integer' because a record can have multiple integers in different fields, like age, number, weight, length, etc.

If you describe array variables, the terminology will be different.

10
  • While this is true, it's not an answer to the question, which pertains to whether he should use on or by as the preposition.
    – Barmar
    Commented Apr 10, 2015 at 21:55
  • Yes, the phrases are grammatically correct, but for a programmer or any technical person, there is no need to mention the integer as it does not make any sense.
    – Oleksii
    Commented Apr 10, 2015 at 22:15
  • See my comment above. I think the purpose of mentioning the integer is because this is describing a variation from the usual method of using an integer as the unique identifier for a row in a database table. It's saying "We're doing X, rather than Y".
    – Barmar
    Commented Apr 10, 2015 at 22:17
  • But in this case, the integer should have its own field name, like id or ordernumber or something. Its like saying 'this job should be done by Jane, not by human (generic meaning)' instead of 'This job should be done by Jane, not by John'
    – Oleksii
    Commented Apr 10, 2015 at 22:22
  • The integer doesn't have a field name because it doesn't exist. He's basically saying that they don't have an ID field in this table, they're using the name as the primary key instead.
    – Barmar
    Commented Apr 10, 2015 at 22:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .