Joomla 2.5多少个可能的类别 [英] Joomla 2.5 How many possible categories
问题描述
我用Google搜索,但只能找到最大文章数的答案.
I googled but could only find answers for the max amount of articles.
问题:简短版本:
Joomla 2.5可以在共享主机上处理多少个可能的类别(带有子类别).我要期待哪些问题?
How many possible categories (with subcategories) can Joomla 2.5 handle on a shared host. Which problems do I have to expect?
问题:长版:
我正在为建筑师建立一个网站.内容结构看起来像这样
I m building an website for architects. The content structure looks like this
HOUSES
Architect A
Project 1
Project 2
...
Architect B
Project 1
Project 2
...
Places
Architect C
Project 1
Project 2
...
Architect D
Project 1
Project 2
...
以此类推.最明显的是将房屋和地方作为类别.建筑师A,建筑师B ...作为子类别,而项目则作为文章.一方面,这将保留使用Joomlas Blog View等的功能,而不使用第三方CCK扩展,但另一方面,这可能会导致300个及更多类别.
And so on. The most obvious would be to have HOUSES and PLACES as Categories. Architect A, Architect B ... as subcategories and the Projects as articles. This would on the one hand keep the ability to use Joomlas Blog View etc. and not use third party CCK extensions but on the other hand this would probably cause 300 and more categories.
感谢您一直以来的大力支持,
Thanks for your always great input,
托尼
推荐答案
您正在根据#__categories
表查看2147483647个可能的类别.
You're looking at 2147483647 possible categories in terms of the #__categories
table.
在Joomla中! 2.5类别表的定义,您将找到:
In Joomla! 2.5's definition for the Categories table you will find:
CREATE TABLE `#__categories` (
`id` int(11) NOT NULL auto_increment,
`asset_id`
<snip ... >
`language` char(7) NOT NULL,
PRIMARY KEY (`id`),
KEY `cat_idx` (`extension`,`published`,`access`),
KEY `idx_access` (`access`),
KEY `idx_checkout` (`checked_out`),
KEY `idx_path` (`path`),
KEY `idx_left_right` (`lft`,`rgt`),
KEY `idx_alias` (`alias`),
INDEX `idx_language` (`language`)
) DEFAULT CHARSET=utf8;
如您所见,主键定义为int
,因此最大INT(2147483647)的MySQL上的="nofollow">值,默认起始点为1,则产生了超过21亿个类别.有关MySQL上的AUTO_INCREMENT的信息,请参见 * 注意
As you can see the primary key is defined as an int
so the max value on MySQL of an signed INT
(2147483647) and default starting point of 1 results in just over 2.1 billion categories. See this *Note about AUTO_INCREMENT on MySQL
注意
每个表只能有一个AUTO_INCREMENT
列,它必须是
索引,并且不能具有DEFAULT
值. AUTO_INCREMENT
列
仅当它只包含正值时,它才能正常工作.插入一个
负数被视为插入了很大的正数.
这样做是为了避免数字换行"时出现精度问题.
从正面到负面,并确保您不会意外
得到一个包含0
的AUTO_INCREMENT
列.
There can be only one AUTO_INCREMENT
column per table, it must be
indexed, and it cannot have a DEFAULT
value. An AUTO_INCREMENT
column
works properly only if it contains only positive values. Inserting a
negative number is regarded as inserting a very large positive number.
This is done to avoid precision problems when numbers "wrap" over from
positive to negative and also to ensure that you do not accidentally
get an AUTO_INCREMENT
column that contains 0
.
在共享主机上,在达到#__categories
主键的此限制之前,您将耗尽数据库空间-类别表中的其余记录指定的空间是主键使用的1300倍左右. (大约)
On a shared host you will run out of database space long before you reach this limit of the #__categories
primary key — the rest of the record in the categories table specifies about 1300 times more space than the primary key uses. (roughly)
因此,您更有可能让正常内容影响托管限制,而不仅仅是类别表.
So, you're more likely to have normal content affect the hosting limits than just the categories table.
这篇关于Joomla 2.5多少个可能的类别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!