I wonder if a database is what you need?
From the example you’ve given, you are picturing (or maybe you have) “tabular” data, with your references to rows and columns. This suggests to me a spreadsheet rather than database, and there are functions to do the kinds of comparisons you describe. (For examples, see this question about comparing values, or a different task.)
For a “database”, I would be thinking rather about different “bundles” of data, or containers if you like, that can intersect, or are “related”, in different ways. If you had a company, it might be “bundles” like: products, employees, sales, etc. The database would then allow you to query the various relationships between these different data sets. It would be worth looking at the links about documentation in oweng’s reply here, or mentioned by qubit here.
I think there can be a bit of a grey area between these two, when it isn’t very clear which is the better tool for the job. A lot of it has to do with how the data is structured, though. So if you could give a clearer idea about that aspect of things (rather than “rows” and “columns”), you would get more help from the database/spreadsheet experts (I’m not one of them!) that give such generous help here.
(Apologies if this is all old information for you – but it seemed not to be from the way you asked your question. Hope it helps!)