A composite key -or a composite of any data fields- is usually done by reference in the properties of the third field which "joins" the other two.
Use Excel to practice some of the concepts. In fact, if it is possible tio use Excel instead of a database, you should do so. Often, a spreadsheet program will do the job perfectly.
Let's suppose that the CardID is the cardholders social sec number, and that the BookID is the Dewey Decimal System number of the book.
In Excel, for example, suppose we have CardID in row 1 of col A and BookID in row 1 of col B.
a1 = 221786966
b1 = 640.76.0025
In row 1 of col C we would put this formula:
A1&B1, or CONCATENATE(A1,B1)
which would return this value: 221786966640.76.0025.
If wanted to put a marker to separate the values visually, we might add a dash (-) so the code would look like this:
A1&'-'&B1, or CONCATENATE(A1,'-',B1)
and return the result: 221786966-640.76.0025
Now, as for the "relationship" part. The CardID will be associated with a name and contact infomration of the cardholder. So, let's say that 221786966 belongs to:
John Gee
314 Oak Street
Anytown, CA 99106
What is important is that John Gee has a UNIQUE CardID shared by no one else. That's one reason a social security number is good to use -there are no two people with the same number.
And so, the CardID sets the relationship between a book that has been taken out and the person who has that book. In one database (spreadhseet) we keep a record of all the cardholders, each one with a unique CardID and contact info. Call that database, "CardHolderTable"
And in another database (spreadsheet) we keep a record of books on loan to cardholders. Call that database "BooksOutTable."
(Sometimes, databases refer to their lists of info as "tables.")
What BOTH have in common is the CardID -thus, we need not repeat John's contact info on the BooksOut table because we have there the "key" to the information in the CardHolderTable -John's unique ID. And so, if we see that a book is overdue, we see the "key" to identify the borrower, and can go to the CardHolderTable to look up John's contact info. This process can also be automated, so that the BooksOutTable "looks at" the CardID part of the composite key, and displays John's contact data -so you don't need to look it up manually. Excel can do all this -no need for a database program like Access.
More on relationships:
A. There are 4 kinds: 1) "One-to-many," in which one datapoint is associated with two or more others. Example: John G has taken out 3 books. John is the "one," and the books are the "many." 2) "Many-to-one," which is the reverse, from the point of view of the books. 3) "Many-to-many," in which several datapoints are associated with several other datapoints. If, for example, the CardID was a"family membership," then several people with the same ID could each have borrowed several books, all on the same date. In general, you should AVOID using many-to-many references as they can get complicated. Finally, 4) "one-to-one" which refers to data that always belongs with some other date and appears ONLY ONCE in the entire data structure. Example: John's phone number goes with John -listed in the same table with him, and listed just ONCE.
B) Relationships may be dynamic or static. Thus, John's ID will never change, and evertime you run a report of borrowers, you'll always see John with HIS number. But the books he borrows WILL change from time to time -that's the dynamic part.
C) Relationships should be used to avoid duplicate data entry whenever possible -you want to enter borrower data and book data just ONCE for each item.
D) Relationships allow virtual data to be generated automatically. For example, if the fine for an overdue book is ten cents per day, we calculate what John owes by calculating the number of days overdue times the rate per day and generating the total owed for today. It's all done with math, "on the fly," the resulting calculation does not exist by itself in the system.
There are other features of relationships, but you get the idea.
Even if you do end using Access (and I pity you), start with Excel so you can experiment with various arrangements and clearly understand what it is you're trying to do.
If you like, I can give you small sample spreadsheet with examples -just use the email link to let me know.
Hope this helps.