Re: Layout Hell

From: LX-i (lxi0007_at_netscape.net)
Date: 07/18/04


Date: Sat, 17 Jul 2004 22:31:19 -0500

Mike wrote:
>>I was with you 'til the last one - you can have multiple-field PK's in
>>Access (I believe at least as far back as version "97")...
>
>
> I said that poorly. You can't have multiple primary key fields that you
> treat as one field or one name - like a group level name is the key which
> consists of many fields underneath it - at least as far I know. If you
> have 3 columns F1, F2, F3 as primary keys you can't say F-All is the key?
>
> Record Key is F-All.
> 05 F-All.
> 10 f1 pic x.
> 10 f2 pic x.
> 10 f3 pic x.

Right. But, instead of assembling the pieces to an intermediary field
and then doing a read based on 1 key, you'd just use those pieces in the
select statement...

select * from f_table where (f1 = [value for f1] and f2 = [value for f2]
and f3 = [values for f3])

...whereas, in the COBOL file equivalent, you'd say...

move [value for f1] to f1
move [value for f2] to f2
move [value for f3] to f3
read f-file record

. You're still dealing with the pieces, just not on the actual
retrieval command.

SQL is a different beast from an indexed file (of course, you seem to
know enough about SQL to know that... ;> ) And, although Access does
its best to hide stuff, you can still create indexes and primary keys to
help speed things up (and maintain data integrity). My biggest grip
with Access is when you have more than one user hitting it - in my
experience, it's locking mechanism doesn't seem to be designed well for
multi-user applications.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~   /   \  /         ~        Live from Montgomery, AL!       ~
~  /     \/       o  ~                                        ~
~ /      /\   -   |  ~          LXi0007@Netscape.net          ~
~ _____ /  \      |  ~ http://www.knology.net/~mopsmom/daniel ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~         I do not read e-mail at the above address           ~
~    Please see website if you wish to contact me privately   ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Relevant Pages

  • Re: SQL Express - Identity specification property - how to change
    ... FOO_ID int identity, ... Tony Rogerson, SQL Server MVP ... They are making unfortunately frequent use of the IDENTITY column in conjunction with Primary Key. ... IDENTITY has none of the properties of a data type because it is not a data type at all. ...
    (comp.databases.ms-sqlserver)
  • Re: Binding and adding rows with SQL identity column
    ... Each time you call AddNew then the DataTable generates a new ... Each time an update is done then the real primary key ... > generated by the built-in wizard in VS2003. ... > identity column on the sql table, perhaps this would all the fine and I ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: What happens after 2^32 autonum keys are exhausted?
    ... Tony Rogerson, SQL Server MVP ... generated primary key despite the risk of a hardware or software error or a fault in the space-time continuum. ... identifier and have to invent one, follow the data design (data ...
    (comp.databases)
  • Re: Can a query find info X numbr of rows from target info?
    ... "Ann Scharpf" wrote: ... > each row is sequentially numbered, giving me the desired explicit sort order. ... > an exact comparison between my SQL & your advice. ... Do you have Row names (Primary Key). ...
    (microsoft.public.access.queries)
  • Re: sliced find in Linq
    ... by over all of the returned columns. ... Since the original query was unordered, I'd like the above SQL to ... (Perhaps your table doesn't have a primary key though?) ... didn't specify the ordering, so any ordering could have been used. ...
    (microsoft.public.dotnet.languages.csharp)