What is relational data? [closed]
Asked Answered
C

1

6

I'm not asking what a relational database is. I'm asking what relational data is. What makes data relational? What are some examples of relational data and of non-relational data that illustrate the difference?


Edit: I now understand that there isn't anything "relational" about the data itself, and that there are advantages to representing certain data sets relationally.

Even if the question is malformed, I think that a lot of other people might have the same question, want to know the answer, google it etc. So I think it'd be useful if they come across this.

Chosen answered 14/7, 2015 at 4:19 Comment(13)
@Panther your comment is not constructive. Googling very often brings people to SO and it can be cleared up here for people with the question in the future.Basset
My mistake. however this question seems very broad for this forumAquatic
All data is relational in the mathematical sense, I consider the terms synonymous.Seafaring
Data is relational to the extent that it is a collection of relations (with no duplicate or ordered columns or rows) each holding the rows that satisfy its given condition. Codd 1970: "The relation depicted is called component. [...] The meaning of component (x,y,z) is that part x is an immediate component (or subassembly) of part y, and z units of part x are needed to assemble one unit of part y". Versus all others: int, string, array, record, list, etc. These (& relations) can be values in rows. But how collections of them represent an application situation is ad hoc.Hypocycloid
@Hypocycloid I realize that not everything in mathematics can be represented by relations. How do you define data? To me it means the true and/or false domains of a predicate.Seafaring
@Seafaring 1. I agree that "data" is vague. I don't expect it to mean much more than "records". But I don't know what you are trying to express by "relational in the mathematical sense", or by "all data is" that , or by "the true and/or false domains of a predicate", or by "data is" that. 2. Re "all data is relational": Storing data as relations holding extensions of predicates is due to Codd's relational model of data for large shared databases (ie for generic manipulation). Prior to that and outside of that, data was/is structured and manipulated in other & application-specifiic ways.Hypocycloid
@Hypocycloid What I'm saying is that relations as defined in set theory are capable of expressing any set of facts (aka data), and that this is independent of its representation in data structures like tables, graphs, nested sets or dictionaries.Seafaring
This is the article I wrote in my attempt to answer the question. Any comments would be very welcomed. As for this question it seems that it should be deleted.Chosen
@Adam, cannot comment over there, so commenting here. You suffer from the common confusion that conflates relationSHIPS (as per ER) with relationS (as per Codd /RM). The two have nothing to do with each other and are totally distinct. RelationSHIPS can equally well be represented as relations in a relational system, as they can be represented by nonrelational structures in a graph-based system. And relationS as per Codd/RM are not limited to representing relationSHIPS.Rabid
@Seafaring As I explained in my last comment, you are begging the question. "Data" is just some (in general, structured) values. It represents something. (Hence we say that a data structure('s value) represents a value or fact.) The data is not the fact. Your expressed notion of "data" assumes the relational model of data. Pre-relational DBMSs and non-relational programs manipulate data, but not by assuming it is only a collection of relations of rows of values satisfying predicates. (For which see Hoare's class & straightforward 1976 "Proof of correctness of data representations".)Hypocycloid
I couldn't find a free copy of Hoare's paper - if you have a link, I'm interested. I'll accept the representational meaning of data since it's in common use, in addition to the logical meaning which is the context of my statement and how it's used historically and mathematically. Relations however are not just collections of rows, but subsets of the product of a collection of domains, and every data structure represents a relation since every data structure has a state space which can be described in terms of its variables. DBMSs before Codd still related values, just not as flexibly.Seafaring
@Seafaring Re "link": I've no link. But google "abstraction function" & "representation invariant". Re "every data structure represents a relation": Represents a tuple (not relation). But in the relational model every data structure is (a tuple of) relations. (The tuple satisfies the predicate that they're extensions of theirs.) The question was relational vs non-relational data, not interpretations of data. Moreover, non-relation data structures are usually not interpreted relationally but as abstract state via an abstraction function. "Relational data" just doesn't mean just "data".Hypocycloid
@AdamZerner Everyday language has 'relationship' aka 'association'. In math, '(everyday) relation'. In math, one is represented by an ordered-tuple set, (hence) '(formal) relation'. In the relatiional model, one is represented by an attributed-tuple analogue, (hence) also a 'relation'. In ER, as correctlly presented, 'relationship' has the everyday meaning and one is represented by a relational relation. But incorrect presentations, derivatives and products frequently use 'relationship' to mean 'foreign key constraint' (ie relationship relation FK referencing entity relation PK), a fact.Hypocycloid
R
6

"Relational data" is poor terminology used to indicate that the data is managed by a "relational" DBMS. "relational" is not a characteristic of the data per se and so the term per se is, essentially, a hopeless misnomer. If you hear someone use it, take it as a serious indicator/alarm that the person in question actually doesn't have a clue.

Also note that truly relational DBMS's actually do not exist (not in the industrial scene) and the closest approximation to a "relational" DBMS is SQL DBMS's like DB2, Oracle, SQL Server, PostgreSQL, ... but that "approximation" is a quite distant one.

Rabid answered 14/7, 2015 at 8:18 Comment(3)
When 'the data is managed by a "relational" DBMS" ', which manages relations of rows satisfying predicates, then the data is relations of rows satisfying predicates. So it seems pretty reasonable to say that 'relational data' is 'relations of rows satisfying predicates'. I understand that that doesn't limit 'relational' to the data per se because it includes context, but it's certainly a reasonable use of an adjective.Hypocycloid
Perhaps your English linguistics are better than mine. But adjectives in language primarily serve the purpose of describing characteristics of the object indicated by the noun. "Relational" is not a characteristic of "data" per se. Which you confirmed. And which is why I said it is poor terminology, aka poor use of language. LIkewise, one doesn't say "green mower" to imply the grass is green, one says "green mower" to imply that the mower is green.Rabid
Adjectives frequently restrict a class to a context and not a property of. Full bottle: bottle filled with stuff. (Yes, also full bottle-plus-some-stuff-inside.) Occupied seat: seat that a person is in. Red circle: red circular thing. French toast: not even toast.Hypocycloid

© 2022 - 2024 — McMap. All rights reserved.