In terms of comparing data structures, is a relational database just a >1 dimensional array? I'm just asking because I don't know much about databases, but I know a bit about data structures.
I am trying to make this clear in my mind.
Computer Science Stack Exchange is a question and answer site for students, researchers and practitioners of computer science. It only takes a minute to sign up.
Sign up to join this communityNo, it isn't. A data structure can be described in two ways:
Obviously, a database doesn't store all its data as a single array.
Arrays support, as basic operations, retrieving an element by index and storing an element under an index. Operations required for databases are (to a first approximation) given by relational algebra: selection, projection, union, difference, and join (or product).
Technically, you could say that a database can be represented as a huge array. The benefit of a DB, however, is the ability to represent this huge array very succinctly.
More theoretically, the benefit of a DB can be compared to the topological fact that cylinder sets can be represented succinctly, as opposed to more complex subsets. Essentially, a DB is a representation of a cylinder set as a multiplication of its respective dimensions.
There is some basic similarity between relational DB and large array (table~multidimensional array).
Relational DB is based on relational algebra which makes it powerful. By using relational operators, information could be retrieved, updated, inserted, deleted etc... in DB efficiently.
Considering array as a simple data structure, it only supports read/write operators in constant time $O(1)$. while in relational db you can write lots of complex queries using relational algebra.