[Tutorial] [MySQL] Table structure and foreign keys
#7

Quote:
Originally Posted by YJIET
View Post
One of the best MySQL tuts around, but I think it's missing a few essential things:
  • relationship types
  • foreign key indexing
  • clustered index
I've been taught that every table should have a clustered index, especially when foreign keys are involved. A useful quote:

Also, If anyone's interested, there's a visual database design tool called MySQL Workbench, which is perfect for designing relational databases.
I'm pretty sure indexed are added automatically by most database systems. I'm entirely sure for MySQL and Postgresql. You make a fair point, they do make a huge difference.

@OP

You should tell something about the good practices when creating queries. Things people should avoid (like using IN, SET operators, explicit joins, LIMIT, etc...) + why you should avoid subqueries (they are always slower) and things people should definately use or atleast attempt to use (like JOINs and GROUP BY). If a query is properly built up it can be executed 100x faster.

My course material explained it really well, unfortunately it's in dutch. I found this though: http://docs.oracle.com/cd/B10501_01/...1016.htm#28529
Reply


Messages In This Thread
[MySQL] Table structure and foreign keys - by Vince - 04.03.2013, 17:19
Re: [MySQL] Table structure and foreign keys - by Misiur - 04.03.2013, 17:35
Re: [MySQL] Table structure and foreign keys - by Kyle - 04.03.2013, 18:00
Re: [MySQL] Table structure and foreign keys - by Scenario - 04.03.2013, 19:26
Re: [MySQL] Table structure and foreign keys - by nGen.SoNNy - 05.03.2013, 19:00
Re: [MySQL] Table structure and foreign keys - by Stylock - 06.03.2013, 12:48
Re: [MySQL] Table structure and foreign keys - by Sinner - 06.03.2013, 13:05
Re: [MySQL] Table structure and foreign keys - by Yves - 06.03.2013, 13:08
Re: [MySQL] Table structure and foreign keys - by Bluec0de - 06.03.2013, 16:31
Re: [MySQL] Table structure and foreign keys - by Stylock - 06.03.2013, 16:32
Re: [MySQL] Table structure and foreign keys - by Luis- - 09.03.2013, 12:56
Re: [MySQL] Table structure and foreign keys - by AndreT - 09.03.2013, 15:16
Re: [MySQL] Table structure and foreign keys - by Kyle - 20.03.2013, 08:27
Re: [MySQL] Table structure and foreign keys - by Michael@Belgium - 20.03.2013, 09:11
Re: [MySQL] Table structure and foreign keys - by Kar - 12.04.2013, 02:51
Re: [MySQL] Table structure and foreign keys - by Vince - 12.04.2013, 05:36
Re: [MySQL] Table structure and foreign keys - by MP2 - 12.04.2013, 06:22
Re: [MySQL] Table structure and foreign keys - by Jay_ - 14.04.2013, 12:45
Re: [MySQL] Table structure and foreign keys - by dusk - 24.07.2013, 15:55
Re: [MySQL] Table structure and foreign keys - by Sinner - 24.07.2013, 21:31
Re: [MySQL] Table structure and foreign keys - by DarrenReeder - 24.07.2013, 23:20
Re: [MySQL] Table structure and foreign keys - by Sinner - 25.07.2013, 10:04
AW: [MySQL] Table structure and foreign keys - by Mellnik - 15.04.2014, 15:42
Re: [MySQL] Table structure and foreign keys - by gotwarzone - 19.04.2014, 10:09
Re: [MySQL] Table structure and foreign keys - by Vince - 26.08.2015, 10:47
Re: [MySQL] Table structure and foreign keys - by Evocator - 19.10.2015, 17:27
Re: [MySQL] Table structure and foreign keys - by nGen.SoNNy - 22.10.2015, 08:34
Re: [MySQL] Table structure and foreign keys - by knuckleduster5 - 10.12.2016, 09:46
Respuesta: [MySQL] Table structure and foreign keys - by adri1 - 10.06.2017, 20:24
Re: [MySQL] Table structure and foreign keys - by Vince - 10.06.2017, 22:02
Re: [MySQL] Table structure and foreign keys - by Gammix - 10.06.2017, 22:10
Re: [MySQL] Table structure and foreign keys - by Tass007 - 16.07.2017, 11:14
Re: [MySQL] Table structure and foreign keys - by Tass007 - 18.07.2017, 21:49
Re: [MySQL] Table structure and foreign keys - by Tass007 - 22.07.2017, 03:48
Re: [MySQL] Table structure and foreign keys - by Kaperstone - 22.07.2017, 04:00
Re: [MySQL] Table structure and foreign keys - by Tass007 - 22.07.2017, 05:04
Re: [MySQL] Table structure and foreign keys - by Kaperstone - 22.07.2017, 16:25
Re: [MySQL] Table structure and foreign keys - by Tass007 - 22.07.2017, 19:30
Re: [MySQL] Table structure and foreign keys - by Banditul18 - 18.10.2017, 13:50

Forum Jump:


Users browsing this thread: 16 Guest(s)