Planet PostgreSQL

Planet PostgreSQL -

Henrietta Dombrovskaya: PGSQL Phriday #005: Relational and Non-relational Data

The topic for the February edition of PGSQLPhriday is Relational and Non-Relational Data. I was a little puzzled that the question “How do you define non-relational data?” is the last one. It only makes sense to answer the first three questions once you clearly define what you are talking about, so that is the first question I will address.  Do we have a formal definition of non-relational data (or relational, for that matter)? If you can’t think of one, there is a good reason for that: “relational” is a characteristic of the model, not the data. Thereby, the only definition we can give would be “The data you can’t represent using the relational model.” But is there anything in the definition of the relational model that limits it to certain types of data? The answer is no, so the best way to interpret the term “non-relational data” would be “the data which can’t benefit from being stored in a relational database.” Most often, it would be documents, images, and other blobs.  If we never need to search inside the document, in other words, we never expect to use any full-text search; in my opinion, there is no reason to store these documents in a database. Like many others, I can recall several cases like the one mentioned by Pat Wright in his blog post. The only thing we need to store in the database is the pointer to the place where the actual document is stored. There is no benefit in storing it in the database. However, it’s a different story when we need to perform a full-text search. Knowing that PostgreSQL’s full-text search capabilities are not the best tools available on the market, I would always try to justify the necessity of that feature. In many cases, after talking to the end users, I would find out that, in reality, the required search touches a limited number of fields/tables and can be transformed into a dynamically constructed query supported by b-tree indexes. (And we know that nothing can perform better than b-tree indexes!) Finally – what if we truly need to implement th[...]

2月份PGSQLPhriday的主题是关系型和非关系型数据。我有点困惑,为什么“如何定义非关系型数据?”是最后一个问题。只有在清楚地定义你所谈论的内容之后,才有意义回答前三个问题,因此这是我要解决的第一个问题。我们有一个正式的非关系型数据(或关系型)的定义吗?如果你想不出来,原因很简单:“关系”是模型的特征,而不是数据。因此,我们唯一能给出的定义是“你无法使用关系模型表示的数据”。但是,在关系模型的定义中,有什么限制它只能表示某些类型的数据吗?答案是否定的,因此最好的解释“非关系型

pgsql

相关推荐 去reddit讨论

热榜 Top10

Dify.AI
Dify.AI
观测云
观测云
LigaAI
LigaAI
eolink
eolink

推荐或自荐