I have a table created in mamp phpMyAdmin as follows:
id Country Province Language
-- ------- -------- --------
1 Canada Alberta English
2 Canada Ontario English
3 Canada Quebec French
4 Australia Victoria English
- I set id=Unique, Province=Primary, Language=Primary. Does it matter if I choose anything to create a relational database eventually?
- How can I reorder the count开发者_StackOverflow社区ry list without reordering the ids? So the updated table has now id 1 Australia and so on?
Yes indices will affect the performance of joined table queries. It's best to tackle those when you start writing the queries.
It depends on the interface. If your admin tool is listing records ordered by ID then you would need to change the ID to change the order (obviously!). If it's for your own purposes, then add a "display_order" field and
ORDER BY display_order
when writing your queries
精彩评论