Difference between Class diagrams in SQL and NoSQL

An Simple Presentation for the Diffrence between two diffrent database architecs.

Most new software developers or software architects make a wrong representation of the Class diagrams when it contains a NoSQL DB and MySQL DB or depends on just a single DB. So drawing the Dialogflow of each one is different because of its storage data types and architecture.

What is an SQL?

SQL refers to Structured Query Language and it is a standardized programming language that is used to manage relational databases and perform various operations on the data in them. SQL is used for modifying database tables and index structures, adding, updating, and deleting rows of data, also it is one of the RDBMS. A famous SQL DB is MySQL.

What is a NoSQL?

NoSQL stands for “not only SQL” rather than “no SQL” at all. This means a NoSQL JSON database can store and retrieve data using literally “no SQL.” Or you can combine the flexibility of JSON with the power of SQL for the best of both worlds. Consequently, NoSQL databases are built to be flexible, scalable, and capable of rapidly responding to the data management demands of modern businesses. A famous NoSQL DB is MongoDB

What is Class Diagram?

a class diagram in the Unified Modeling Language (UML) is a type of static structure diagram that describes the structure of a system by showing the system's classes, their attributes, operations (or methods), and the relationships among objects.

Drawing the Diagram with SQL

sqlDiag.png As the Image Above is presenting the "person" table related to the address table with a foreign key and two other tables which are Student and Professor inherited from the parent table it's necessary data with a link to the address table. So the schema of the SQL is relational to each other with foreign keys.

Drawing the Digram with NoSQL

nosqlDiag.png

for the NoSQL, schema are not related but contain each other, as we know the size of a single NoSQL document is less than 16 MB, so it will be presented as A schema of collections, and Collections contain documents. For presenting the relations the collections can have a list of documents, and also documents can have a list of other documents, so there is no fear.

Conclusion

Every database type has its strength and usages but presenting it as a drawing is hard than using it directly, And further, many college students or some new software architects are drawing these DBs in a bad way, which ruins the code later.

Thank you for reading my article and please DM me for any mistyping or wrong informations