Wiki

Articles tagged with "database"X
Displaying 11-15 of 15 result(s).

Single table inheritance

Created 2 years ago by samdarkHow-tos6 comments – viewed 20,597 times – ( +37 ) – version 1.1
Relational databases do not support inheritance so if we need to represent it, we have to somehow store meta info while keeping performance by minimizing JOINs. One way to solve this problem is using single table inheritance. All fields for the whole class tree are stored in a single table. Class name is stored in the type field of the same table.

A simple class to use a different db for a module

Created 2 years ago by tydeas_drTips2 comments – viewed 11,575 times – ( +9 ) – version 1.1
What would you do if you want/need to have a different than the main database connection in an module's models?

Getting nulls from database instead of empty strings

Created 2 years ago by samdarkTips2 comments – viewed 8,457 times – ( +12 ) – version 1.1
To get null from database instead of empty strings you need to set up your DB connection as follows:
tags: database, null

Multiple-database support in Yii

Created 3 years ago by Steve FriedlHow-tos14 comments – viewed 57,919 times – ( +27 ) – version 1.1
The customary configuration of a Yii application includes just a single database section in the protected/config/main.php file, but it's easy to extend this to support more than one, tying each Model to one of the databases.
tags: Database

Multiple Databases and Multiple Domains

Created 3 years ago by got 2 doodleTutorials2 comments – viewed 27,563 times – ( +14 / -2 ) – version 1.1
Add these lines in /config/main.php
tags: database