Server database structure
#9

I am assuming that the first table you posted only contains unique models. So in that case you should probably remove the "ID" column and use "model" as the primary key. Then you can link the components table using a foreign key. Use natural keys when they're available.

One particularly nice feature I recently discovered in phpMyAdmin is this:

So when you have relations set up correctly it will show like this:


Putting multiple values in one column, however, is simply not done. You could probably create a view to denormalize the tables to recreate the structure you currently use. http://stackoverflow.com/questions/2...into-one-field
Reply


Messages In This Thread
Server database structure. Share your database structure! - by dusk - 12.09.2014, 12:37
Re: Server database structure - by Vince - 13.09.2014, 10:19
Re: Server database structure - by RajatPawar - 13.09.2014, 10:31
Re: Server database structure - by iFarbod - 13.09.2014, 11:45
Re: Server database structure - by dusk - 13.09.2014, 13:39
Re: Server database structure - by IceCube! - 13.09.2014, 14:50
Re: Server database structure - by Pottus - 13.09.2014, 14:51
Re: Server database structure - by PowerPC603 - 24.02.2015, 10:40
Re: Server database structure - by Vince - 24.02.2015, 14:14
Re: Server database structure - by PowerPC603 - 24.02.2015, 14:32
Re: Server database structure - by Extremo - 24.02.2015, 15:13
Re: Server database structure - by PowerPC603 - 25.02.2015, 09:32
Re: Server database structure - by Luis- - 25.02.2015, 15:02
Respuesta: Re: Server database structure - by kirk - 25.02.2015, 16:41
Re: Server database structure - by PowerPC603 - 25.02.2015, 21:48

Forum Jump:


Users browsing this thread: 1 Guest(s)