2. Roles of a database in Backend Development

2. Roles of a database in Backend Development

Why have a database?

  • Databases are critical for web development
  • Mainly because databases allow you to store, retrieve and manage data for web applications
  • They provide persistent data storage, so a user can come back to your site later and their data will be there waiting for them

How do we pick the type of database?

  • As we’ve mentioned before, there are two main types of databases:
    • Relational (SQL) databases
    • Non-relational (NoSQL) databases
  • Relational databases are frequently used when the data we’re working with the is structured data with complicated relationships
    • Such as e-commerce or finance data
  • Non-relational databases are frequently used when the data isn’t as structured or there’s more real-time data
    • Such as with social media apps
  • Realistically, either type of database can work, if you want it to
    • They both have their advantages and disadvantages, which one you end up choosing is up to you
    • You might just have to do more work to get a certain type of database to fit your use case