Data Models
When you think of system design, Data Models is a common term that you will hear. So what are Data Models? Very simply it is the way how data for a product or tech system is represented. And this represented ideally depends on the customer or the use case.
Take the example of a car. One way to define a car can be to use the attributes like model, color, price, year of manufacture. Another way to define a car can be using attributes - License plate, owner name, history of accidents. If you are making a tech product for the use of a car buyer - then the Data Model 1 is more relevant and if you are making a tech system for the police, then Data model 2 is more relevant. (One more reason to think customer backwards!!).
Broadly, there are three types of data models: 1) Relational; 2) Document; 3) Graph.
The most well-known is the relational data model. You can see this data typically in a tabular format where each row represents a relation. (SQL is a popular language to retrieve this data). The constraint is that the columns become fixed - in other words the schema is fixed. It is a significant effort to expand this data model once created.
Document models are a string of text or binary format. JSON is a popular format where the string consists of Key and Values. It is all one string but you can make out the structure. This format is more agile since you can add or remove key values.
Graph model is a set of nodes and edges. Edges represent the relationship between nodes. It is faster to retrieve data from a graph database.
Comments
Post a Comment