开发者

Is it possible to nest sqlite tables within each other?

Is it at all possible to nest tables within each other in sqlite using PDO?

Am i able to create table "thisExtra" inside table "ex开发者_运维技巧ample" inside row "this" at collumn "y"?

If it is possible, how would i go about doing so? Would there be any hard-hitting performance implications?

The reason i ask this is because im used to accessing data from xml files - where i can put whatever i want wherever i want (within reason of course)

Thanks in advance!


No. A table is not a valid datatype for a field in SQLite. You will need to create a relation to another table.

As a side note, complex XML documents do not lend themselves to being stored in a relational database piece-wise. You should consider trying something different.


Short answer is yes, sort of. You could store your subtables as blob objects. However, that said this is a terrible, terrible idea. It is completely counter to the purpose of using a relational database. And accessing the data would be processing intensive and less than optimal. Did I mention this is a bad idea?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜