Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Help! Database design problem

Help! Database design problem

From: D Beaven <dc_beaven_at_yahoo.co.uk>
Date: 2000/06/23
Message-ID: <39532480.9FB9B75F@yahoo.co.uk>#1/1

Am a beginner to database design and would appreciate how to best achieve this database design scheme - does it follow normalisation rules

etc

I need to have a way in which I have a program that for a designated user it pulls a UNIQUE row for that user from the card table. How best to do this?

One way is have a user table, with columns ID (Primary key), Name, etc

a card table, with columns Card number (Primary key), value on card

and a transactions table with columns Transaction (Primary key), [user table, ID], [card table, Card number]

Then do a query that searches the transaction table against the user ID and finds all card numbers NOT already used for that user. Then in the program I could select a random one from the (long) list of possibles, and update the transaction table with that record.

Is this a good way to do this or very inefficient especially when the transaction table get long??

Thanks for any advice on other ways of doing this

David Received on Fri Jun 23 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US