A system comprising: at least one hardware processor; and a computer-readable medium storing instructions that, when executed by the at least one hardware processor, cause the at least one hardware processor to perform operations comprising: obtaining, from a first database, data in a non-flat format, and metadata corresponding to the data; flattening the data into flat data; augmenting the flat data with the metadata, wherein the metadata includes data type and attribute names; examining the attribute names and seeing if there are a first attribute and a second attribute sharing at least part of their names; scanning one or more pieces of the flat data to locate a first piece of flat data having the first attribute with attribute values that are a subset of attribute values of the second attribute of a second piece of flat data; creating a link between the first attribute of the first piece of flat data and the second attribute of the second piece of flat data; generating a graph structure, the graph structure containing a plurality of nodes, each node corresponding to a data type of the flat data and corresponding to one or more pieces of data in the flat data of the corresponding data type, the graph structure further containing a plurality of edges connecting one or more of the plurality of nodes, each edge corresponding to a link between an attribute of a node at one side of the edge and an attribute of a node at another side of the edge; and storing the flat data and the graph structure in a second database. at least one hardware processor; and a computer-readable medium storing instructions that, when executed by the at least one hardware processor, cause the at least one hardware processor to perform operations comprising: obtaining, from a first database, data in a non-flat format, and metadata corresponding to the data; flattening the data into flat data; augmenting the flat data with the metadata, wherein the metadata includes data type and attribute names; examining the attribute names and seeing if there are a first attribute and a second attribute sharing at least part of their names; scanning one or more pieces of the flat data to locate a first piece of flat data having the first attribute with attribute values that are a subset of attribute values of the second attribute of a second piece of flat data; creating a link between the first attribute of the first piece of flat data and the second attribute of the second piece of flat data; generating a graph structure, the graph structure containing a plurality of nodes, each node corresponding to a data type of the flat data and corresponding to one or more pieces of data in the flat data of the corresponding data type, the graph structure further containing a plurality of edges connecting one or more of the plurality of nodes, each edge corresponding to a link between an attribute of a node at one side of the edge and an attribute of a node at another side of the edge; and storing the flat data and the graph structure in a second database. obtaining, from a first database, data in a non-flat format, and metadata corresponding to the data; flattening the data into flat data; augmenting the flat data with the metadata, wherein the metadata includes data type and attribute names; examining the attribute names and seeing if there are a first attribute and a second attribute sharing at least part of their names; scanning one or more pieces of the flat data to locate a first piece of flat data having the first attribute with attribute values that are a subset of attribute values of the second attribute of a second piece of flat data; creating a link between the first attribute of the first piece of flat data and the second attribute of the second piece of flat data; generating a graph structure, the graph structure containing a plurality of nodes, each node corresponding to a data type of the flat data and corresponding to one or more pieces of data in the flat data of the corresponding data type, the graph structure further containing a plurality of edges connecting one or more of the plurality of nodes, each edge corresponding to a link between an attribute of a node at one side of the edge and an attribute of a node at another side of the edge; and storing the flat data and the graph structure in a second database.