Please suggest me the best way to design my database.
Posted
by
Raymond Ho
on Stack Overflow
See other posts from Stack Overflow
or by Raymond Ho
Published on 2011-01-09T08:40:15Z
Indexed on
2011/01/09
8:53 UTC
Read the original article
Hit count: 231
database
|database-design
I have a table named "Pages" and a table named "Categories". Each entry of the table "Pages" is linked to the table "Categories". The "Categories" table have 5 entries, they are: "Car", "Websites", "Technology", "Mobile Phones", and "Interest".
So each time I put an entry to the "Pages" table, I need to map it to the "Categories" table so are arranged properly.
Here's my table:
Pages
______
id [PK]
name
url
Categories
______
id [PK]
Categoryname
Pages2Categories
______
Pages.id
Categories.id
So my question is, is this the most efficient way to create this kind of relationships between tables? It seems very amateur
© Stack Overflow or respective owner