Yii Framework Forum: New To Yii And Oo - Myisam, Leave Relations Empty? - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

New To Yii And Oo - Myisam, Leave Relations Empty? Rate Topic: -----

#1 User is offline   crachazz 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 26-October 12

Posted 26 October 2012 - 09:47 PM

Hi there,

I'm new to Yii and also learning OO atm, I have a project which is supposed to be a single user system to track traffic from paid advertisements.

Now I did my research on what MYSQL engine to use for my reporting database, and came to the conclusion that it must be MYISAM because of the much better read performance when using fixed rows with char columns.

The reporting part of the system will have like 95% reads/5% insert/update/delete, and potentially have tens or even hundreds of millions of rows with tracking data after a while. And to quickly build reports of this data I think I have to use MYISAM over INNODB and a single table approach for the tracking data to get the most read performance out of the system...


Ok that was now just to explain what I build and why I use MYISAM :D

The real question I have is if I can or should leave the relations methods in the models that gii generated for me, completely empty...? Or will that have any negative effects that I don't know about yet, because I am still learning everything.


BTW: Thanks a lot for making yii, it seems to be an awesome framework and I'm sure I will use it for all of my projects in the future!
0

#2 User is offline   guaruja 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 68
  • Joined: 10-March 12

Posted 27 October 2012 - 05:45 AM

View Postcrachazz, on 26 October 2012 - 09:47 PM, said:

The real question I have is if I can or should leave the relations methods in the models that gii generated for me, completely empty...? Or will that have any negative effects that I don't know about yet


Relations array is automaticly filled (by gii) when you have constraints defined between tables (which is only possible using InnoDB engine)

If you opt for MyISAM these relations are not beeing constructed by gii. But there is no resaon why you can not define relations array by hand. although note that there is a vast options of other kinds of relations that can be defined (such as stat queries or some other specific query). And yes, it is perfectly fine to leave relations array empty if you do not want to use it (but you should, as it is a nice way to define common used queries)
0

#3 User is offline   Da:Sourcerer 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,222
  • Joined: 30-March 11
  • Location:Berlin, Germany

Posted 27 October 2012 - 11:09 AM

View Postguaruja, on 27 October 2012 - 05:45 AM, said:

Relations array is automaticly filled (by gii) when you have constraints defined between tables (which is only possible using InnoDB engine)

In v1.0.x, you could define relations via column comments. I don't know if this still works in v1.1, but it might be worth the try.
programmer /ˈprəʊgramə/, noun: a device that converts ►coffee into ►code
0

#4 User is offline   crachazz 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 26-October 12

Posted 27 October 2012 - 10:27 PM

View PostDa:Sourcerer, on 27 October 2012 - 11:09 AM, said:

In v1.0.x, you could define relations via column comments. I don't know if this still works in v1.1, but it might be worth the try.


Danke! good tip, could be worth testing that :D
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users