Reply to perf

Your name:

Reply:


Posted by ibiza on 02/02/06 21:04

Hi SQL gurus,


I have a table structure question. I will have a table 'Models' that
has one to many 'incomes' and one to many 'costs'. These 2 entities
have exactly the same structure, which is 7 smallmoney and a name. Is
it better to create a table 'Incomes' and a table 'Costs', with both
the same number of fields like this :


Incomes
-------------
in_idmodel
in_1
in_2
in_3
in_4
in_5
in_6
in_7
in_name


Costs
-------------
c_idmodel
c_1
c_2
c_3
c_4
c_5
c_6
c_7
c_name


or is it better to create one single table that will contain both
entities like that :


Incomes_Costs
-------------
ic_idmodel
ic_1
ic_2
ic_3
ic_4
ic_5
ic_6
ic_7
ic_name
ic_isIncome


which only differs from the 2 above by the isIncome field to know which

row is an income and which row is a cost.


I'd like to know which method is the best in terms of performance and
general structure and would greatly appreciate if you explain a little
the reasons that drove you to suggest me a method over the other.


Thanks all for your time!


ibiza

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация