By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,495 Members | 1,076 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,495 IT Pros & Developers. It's quick & easy.

inserting/retrieving data with relational databases

P: n/a
Hi all,

I am creating a database based site that keeps track of books, who has read
them and the comments they have.

After a little help in M.P.I.asp.DB I managed to create a database (access
2000) as follows

USERS TABLE

record_ID (auto number)
name
email (primary key)
password
BOOKS TABLE

record_ID (auto number)
book_title (primary key)
REVIEWS TABLE

record_ID (auto number)
unique_ID_book (linked to primary key in books table)
unique_ID_user (linked to primary key in users table)
review
date_reviewed

I linked the tables using the graphical interface in Access

now, what I'm not sure about is how I go about entering and retrieving the
data into these tables.

I can enter each users details into a new record (using simple form data)
and each is assigned a unique identifier (email address in this case), he
same thing with the books table (with book name being the unique
identifier).

then I insert into the reviews table, the unique identifier for the user,
the unique identifier for the book and the review data.

if it's not a new user or a new book then I simple add the unique identifier
for the user and the book into the review table along with the review

is this correct?

now...the data retrieval

do I perform a query on the reviews table, extract the data, and then use
this data to perform further queries on the users table and books table??

e.g lets say I'm looking for all reviews for book1,

I search the books table for the unique identifier for book1

Once I have the unique identifier for book1, I then search the reviews table
for all occurences of this identifer.

for each result I get, I then have to take the unique identfier for the
users who have read this book and the search the users table to get the
users details..
is that how it's done? and if so, I fail to see the need for the linking??

or am I missing something very obvious?
many thanks for your help
Nov 12 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.