Dbase design question for 2 tables

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
tdnxxx444
Forum Newbie
Posts: 23
Joined: Wed Mar 08, 2006 5:57 pm

Dbase design question for 2 tables

Post by tdnxxx444 »

Was wondering which is there better database design situation:

1.
user
------
user_id
user_name

item
------
item_id
user_id
item_name

2.
user
------
user_id
user_name

item
------
item_id
item_name

user_item
----------
user_id
item_id
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

what's this intended for? Can you describe what you are trying to do?
tdnxxx444
Forum Newbie
Posts: 23
Joined: Wed Mar 08, 2006 5:57 pm

Post by tdnxxx444 »

Each user is suppose to have various items in his inventory.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

so, any number of users can have any number of items, basically? The second one then.
Post Reply