Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
  1. #16
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    1,044

    does that indicate the db is 'relational' ? And the PK should stay ?
    A lot of people think 'relational' points to the relations between tables, but in fact it points to the relation between columns and rows. A relational database stores the data in columns (or fields or attributes): one column = 1 type of data for intance a column with names. One row (record, tuple) is a collection of all data belonging to one entity (example: all data of one person). The data that belong to one object/class are grouped in a table: like Persons, Sales, ... .These objects can interact : for instance a person can buy something. Than there exists a relation between tables person and sales. To prevent that you have to repeat name and adress ect. of a person with each sale, you create a primary key field in table Persons: this must be unique for each person and must always be filled in, just like your social security number. In the table Sales, you only have to note this one field to be able to retrieve all data for that person from table Persons, this is the foreign key field in table Sales. There is a lot of info on the net describing relational databases and normalisation. I suggest you do some reading there.

  2. #17
    Middlemarch is offline Competent Performer
    Windows 10 Access 2019
    Join Date
    Mar 2015
    Posts
    365
    @NoellaG thanks for that rundown. I can relate that to tmy tables. I've done a fair bit or reading but often it raises more questions that answers. Experimentation seems to work best.
    CJ I looked at the relationship window for the first time ever. Weird! But once rearranged it was a bit better. I'm in two minds about asking this as the thread may have run it's course.
    I've 5 sets of 2 tables, pretty much how NoellaG described Person and Sales. The relationship window shows only 3 of those 5, although all have a PK (they're the 'same' just with different data.)
    The 'persons' (my equivalent) table is shown 4 times for each 'sales', named to Persons, Persons_1, Persons_2 etc. Is there a simple explanation for that, or what it means?

  3. #18
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    you can add tables - just drag them on to the relationships window or click on show table and select from there

    named to Persons, Persons_1, Persons_2 etc. Is there a simple explanation for that, or what it means?
    a table can only appear once 'as itself' in the relationships (or query window), if it is on there more then each extra 'instance' has to be aliased - access automatically adds _1, _2 etc as an alias.

    In the relationships window, that is a given. Outside the scope of this thread but in a query window you can change it if you want to. (I often alias my tables just to reduce the amount of typing involved)

    Have to say from your description, it doesn't sound like your app is particularly well structured

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Two key as primary
    By johnseito in forum Database Design
    Replies: 3
    Last Post: 05-13-2019, 02:24 PM
  2. Get ID of Primary Key using VBA
    By jaryszek in forum Access
    Replies: 8
    Last Post: 10-06-2017, 10:18 AM
  3. Primary key
    By vugar in forum Access
    Replies: 15
    Last Post: 09-07-2015, 02:30 AM
  4. primary key
    By handsomealso in forum Access
    Replies: 1
    Last Post: 04-09-2013, 06:07 AM
  5. Primary Key Help
    By phoenix13 in forum Access
    Replies: 4
    Last Post: 07-30-2009, 12:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums