Which Database Type Should I Use For My App?

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 พ.ย. 2022
  • Which database type is right for my project? If my app only has one user, does that answer change? Which type is right if I distribute my application? These are the questions we will answer in today's episode of Dev Questions.
    Website: www.iamtimcorey.com/
    Ask Your Question: suggestions.iamtimcorey.com/
    Sign Up to Get More Great Developer Content in Your Inbox: signup.iamtimcorey.com/

ความคิดเห็น • 71

  • @Noitcereon
    @Noitcereon ปีที่แล้ว +24

    0:53 What's the purpose of a database?
    To select a database ask yourself the following questions:
    1. 6:26 Does it need to be portable?
    2. 6:55 Is it a single-user or multi-user database?
    3. 7:37 Does it need to be secure?
    4. 9:04 Does this database need to be replicated?
    5. 9:54 How fast does it need to be?
    10:27 Examples
    12:02 To use the 5 questions: get to know different database types.
    14:59 Get to know your database choice.
    16:10 Outro/summary

    • @poupilouppolpy7514
      @poupilouppolpy7514 7 หลายเดือนก่อน

      @timrobertson4168what did you end up doing ?

  • @faisalalhoqani6151
    @faisalalhoqani6151 ปีที่แล้ว +1

    Great episode, thank you, dear Tim, for supporting the community and being objective.

  • @SakuraTheSpaghettiCoder
    @SakuraTheSpaghettiCoder ปีที่แล้ว +27

    Someone needs to make a flowchart based on this video.

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว +11

      A flowchart is difficult because of all of the conditions to consider. A given project might have 100+ conditions to consider and another project might have 150 and only 25 in common with the first project.

  • @jamessawyer8565
    @jamessawyer8565 ปีที่แล้ว +1

    Great advices, I'll start refreshing my knowledge on dbs. Thank you

  • @AfternoonLemon
    @AfternoonLemon ปีที่แล้ว

    Great video, and absolutely true on all points! You often see Devs who know SQL and know it really well, so they always choose a SQL database as opposed to NoSQL. I'm currently working on a project where that happens, and there are so many unnecessary table locks.

  • @Obamanamamama
    @Obamanamamama ปีที่แล้ว +4

    Tim have you ever used postgresql, if so what do you think about it

  • @ewwitsantonio
    @ewwitsantonio ปีที่แล้ว +6

    11:24 Yeah, about $5 sounds about right. I had set up a small SQL server on Azure for testing and it cost roughly 4.85 - 5.00 per month. The biggest downside is that the server would go into some sort of inactivity mode, and when trying to access the DB for the first time in a while it would take over a minute to start up again. Not sure how long the cool down time was, or how to change it, or if that setting is available in the low-cost tiers.

    • @iandalrymple7255
      @iandalrymple7255 ปีที่แล้ว

      Yeah same for me with that warm up time. I created an Azure Logic App to wake up the database a few minutes before my cron based Azure function would run. Seemed clunky but it worked.

    • @edwardmacnab354
      @edwardmacnab354 ปีที่แล้ว +1

      @@iandalrymple7255 Unix style thinking

  • @RESIDENTECH1
    @RESIDENTECH1 ปีที่แล้ว

    The sqlite video on the site was a life changer, im planing on setting aside some funds for the sqlite course on your website 👍#thanks

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว +1

      Great! Just so you know, the Black Friday sale has started. Now is a great time to buy it (but only if you can afford it - if not, please wait and save up - I really don't want people making unwise financial decisions because of a sale. Sales will come around again.)

  • @NaftuliSinger
    @NaftuliSinger หลายเดือนก่อน

    This is such a good video!!! Thank you.

    • @IAmTimCorey
      @IAmTimCorey  หลายเดือนก่อน

      You are welcome.

  • @JonathanPeel
    @JonathanPeel ปีที่แล้ว +2

    It is a great video, as usual :D
    Since learning of it, I am really wanting to use Neo4J in a project, but the truth is I think SQL is the the right one for the project.

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว +1

      Doing what is right for the project is important. Maybe you can use Neo4J in a practice project or side project.

    • @JonathanPeel
      @JonathanPeel 10 หลายเดือนก่อน

      @timrobertson4168 it depends.

  • @waynehawkins654
    @waynehawkins654 ปีที่แล้ว +1

    Thanks Tim. Good advices as always. One of the steep learning curves was understanding SQL query. Back then things works but run slow. 5 years on and looking back. This is the foundation to work from. Now learning and getting better at EF, this basic understand is critical moving forward.
    I hope one day EF Core will work native with MongoDB to keep cost of large project down. SQL from Microsoft cost Soooooooo much.

    • @aronlinde1723
      @aronlinde1723 ปีที่แล้ว

      Sadly that is unlikely. Shareholders need to get paid after all.
      MS really needs to figure out a start up and mid tier service level and maybe acquire a slice of some No SQL style DB or some hybrid form inside an MSSQL instance. I like building inventories and hierarchies in MSSQL, but invoicing and records at time are so much better in a NoSQL environment.

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว

      I'm not exactly sure what EF would add to MongoDB. What are you missing? EF is an ORM (object relational mapper). MongoDB already stores data in objects, so there is no need to map them. EF does support CosmosDB, but I wouldn't really recommend it.
      @aronlinde1723 - I would recommend you look into what EF supports. It is a common misconception that it only supports SQL Server. It actually supports quite a few database types, including MySQL, SQLite, and more: learn.microsoft.com/en-us/ef/core/providers/?tabs=dotnet-core-cli

  • @DonBout
    @DonBout ปีที่แล้ว +2

    Threw up in my mouth a little when you said "Microsoft Access". My sysadmin days were plagued with apps built on access...

  • @joeprincipato5211
    @joeprincipato5211 ปีที่แล้ว

    Question on a scenario where you had static data, like 500 years of Calendar dates you wanted to allow anyone read only access to run complex queries on. In that case, would it be better for your application to generate query results in the app, or to put the data in a database and query that, and if a database, which type?

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว +2

      If it is just the dates themselves, this seems like something you would generate. However, you would need to figure out how it is being used and test a few different options. It might be better if you used a caching database or even in-memory cache. There is a lot that needs to go into the decision.

    • @joeprincipato5211
      @joeprincipato5211 ปีที่แล้ว +1

      @@IAmTimCorey I never thought about in memory cache... not really sure how to do that. maybe you covered this in your videos - or courses -- I think I remember dealing with cache in the Suggestion App course -- but I could be wrong .. thanks Tim, for the ideas ...

  • @terencejoubert1320
    @terencejoubert1320 ปีที่แล้ว +2

    Have you considered multi model/graph databases such as ArangoDB?

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว +1

      Those are in the NoSQL category that I mentioned. It depends on the project when I consider using them.

  • @boggo6013
    @boggo6013 ปีที่แล้ว +1

    Literally been searching for this video last week, Tim knows what’s up

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว

      I'm answering suggestions from the suggestion site, so it isn't exactly mind-reading. 🙂 I'm glad it will be helpful.

  • @RnRoadkills
    @RnRoadkills ปีที่แล้ว +14

    I have been developing software and databases about 30 years. Back then, developers knew about databases and sql, but the last 10 years only very few developers knows about databases and sql. Back in the “old” days every developing teams had database specialists. But today they don´t. Everybody is using EF or dapper (or something like that) and knows nothing about sql. It is not so much about choosing the right database (because if you know nothing about databases, you might as well flip a coin), it is about knowing that you need a database specialist on your team. Developers today just create a database in azure (or simular) and add the connectionstring in EF. If they know how to join two tables, they think they are database experts. And all that makes it even worse, because project leaders and simular parts of the team really believes they have expert database knowledge. I am not complaining, because when the s*it hits the database fans, they are calling guys like me. And they are flashing the big wallet to have the problems fixed.

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว +2

      I won't say this is everywhere, because a lot of teams realize they need to understand how to work with the foundation of their application (the database), but it is a pretty common issue that people overestimate their skills in and underestimate the importance of knowing how to work with the database.

    • @RnRoadkills
      @RnRoadkills ปีที่แล้ว +1

      @@IAmTimCorey Agree. But my point is, if you need guidance for what kind of database you need for a project, then the advice should be that you need someone who knows about databases to make that choice. Because if you don’t have the database skills to choose what kind you need, then you will not have the skills to develope a good database software solution for it anyway.

    • @PelFox
      @PelFox ปีที่แล้ว +3

      @RnRoadkills Though Azure solves a lot of things about infrastructure for you. It has automatic backups, easy scalability and AI generated indexes etc. You can get very far knowing fundamentals of SQL but model your domain with EF and never thouch actual SQL.
      Also many modern systems are built on microservices so you usually have many smaller databases (sql/nosql). So I feel its very rare to get bottlenecked by big cloud hosted databases today. If you are at that scale you most likely have hired DBAs anyway.
      Personally Ive worked almost primarly with Nosql the last couple of years and its been great. Storing aggregates as Json documents with one key look up as well as the scalability of nosql.

  • @hevymetldude
    @hevymetldude ปีที่แล้ว +2

    We still use Btrieve as Recordmanager since QB4 :)
    That's NoSQL before it was cool.
    But thats only half the truth, because there is also an SQL Server that can sit on top of Btrieves records structure - so we could use both. But we don't.

    • @JoeBonez
      @JoeBonez ปีที่แล้ว +1

      You’re giving me flashbacks to my Novell NetWare days

  • @kikodekliko1209
    @kikodekliko1209 ปีที่แล้ว

    Hi Tim, I am making a playlist for myself for C# so I can have a full day of learning at a later time, but have you noticed that at your channel the 'add to playlist' button has been moved behind another button but this isn't the case for other C# content creators? What's going on? Is TH-cam trying to make your content less available?

  • @weisong3593
    @weisong3593 ปีที่แล้ว

    Could you recommend a video that talks about how to choose DB based on requirements?

    • @IAmTimCorey
      @IAmTimCorey  11 หลายเดือนก่อน +1

      That's a pretty deep topic. A lot is super-specific to your situation. For instance, it matters what your team is familiar with, what you already have in place, what your budget requirements are, where your product is going in the next five years, what your SLAs are like, what tools you are already using, and what data you already have in which places. The "right" choice for one company might be the wrong choice for another company, even if they are both working on the exact same project independently of each other.

  • @selahattinkaradogan2744
    @selahattinkaradogan2744 ปีที่แล้ว +1

    how about postgresql tim?

  • @bilelrahmouni01
    @bilelrahmouni01 ปีที่แล้ว

    im devolepping a rn app that shows realtime location, should i only use firebase or can i use mongodb also?

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว +1

      Use what works best for your project.

  • @LiveErrors
    @LiveErrors 7 หลายเดือนก่อน

    Note that Redis is perfectlyn capable of being a primary database if you dont need a large one

    • @IAmTimCorey
      @IAmTimCorey  6 หลายเดือนก่อน

      Be REALLY careful with that advice. Redis is an in-memory cache. Memory is volatile. Redis has options for persisting the cache to disk and they have the ability to act like a full database. Those are options, not necessarily the defaults.

    • @LiveErrors
      @LiveErrors 6 หลายเดือนก่อน

      @@IAmTimCorey yes, you would need to set the backup imaging to safe mode
      im mostly saying it because Redis has the capacity to be a simple database, which is a bit underapreciated

  • @getparadox
    @getparadox ปีที่แล้ว +2

    Wow, forgot about M$ Access!

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว

      It still fills a specific need. I used it recently to help out a friend. It was the right tool for the job.

  • @torrvic1156
    @torrvic1156 ปีที่แล้ว

    And in which cases we can prefer MySQL? It’s free but it’s no MSSQL. I see how PHP and Java devs love to use it.

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว +1

      There are a LOT of factors that go into choosing a database.

  • @rockymarquiss8327
    @rockymarquiss8327 ปีที่แล้ว

    I'm starting to like PostgreSQL

  • @ninasaabiyeh926
    @ninasaabiyeh926 ปีที่แล้ว

    Who can know it all about all types of databases anyway ?! Do we really need to learn them all first ?

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว +1

      I would recommend knowing the majn options for databases (Microsoft SQL, MongoDB, MySQL are the big three for business apps). That doesn't mean you need to be an expert in each. You just need to know how to work with each at first and what each is best at. Then, when you choose which one to use for your project, you should learn it in more depth. If you are learning to get a job, pick one and go into depth on it. I would recommend Microsoft SQL, since that is a popular one for business applications that use C#. Then learn MongoDB next, since that is a good alternative.

  • @BA_HOSSIEN
    @BA_HOSSIEN 10 หลายเดือนก่อน

    i like your video but not intro

    • @IAmTimCorey
      @IAmTimCorey  10 หลายเดือนก่อน

      👍🏻

  • @cjm3801
    @cjm3801 ปีที่แล้ว +1

    Too many tools in your toolbox will cause your toolbox to get heavy and hard to carry around.

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว +3

      You don't have to carry every tool you own. My plumber has a van full of tools, plus more back at the shop. I've never once heard him complain that he has too many tools. The same is true for software developers - we can never have too many tools. Options are good. Even if you don't fully remember everything about the option, knowing it exists and knowing roughly what it does is often good enough, since you can go and refresh yourself when you need to use it.

  • @DerClaudius
    @DerClaudius ปีที่แล้ว +3

    Jeez, that was a rambly unorganized mess of an information-sparse buzz word salad.

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว +4

      Thanks for promoting it.

    • @pjn2001
      @pjn2001 ปีที่แล้ว +3

      There is nothing mentioned in the video I would classify as being 'buzz words". But please feel free to share with the rest of us a list of words that you actually do consider to be "buzz words". Thanks.

    • @DerClaudius
      @DerClaudius ปีที่แล้ว

      @@pjn2001 I mean the repetition of a small amount of concepts and products over and over without actually saying much. If you know what he's talking about, you realize what a very limited perspective the base for this video is and if you don't, how is telling a beginner to evaluate 5 - 10 databases in depth any help?

    • @IkethRacing
      @IkethRacing ปีที่แล้ว

      @@DerClaudius this video isn't a class, it's just to point you in the right direction to find the info you need

    • @DerClaudius
      @DerClaudius ปีที่แล้ว +2

      @@IkethRacing Well, I think I voiced my opinion well enough to be understood. This is a fluff piece and it doesn't answer the question in the title well.

  • @kanelives2895
    @kanelives2895 8 หลายเดือนก่อน +1

    Superficial, long-winded and all over the place. That's a thumbs down from me.
    Why would you even talk about big organizations and how big their data is. People at that scale are not the target audience for an intro video, yet you spend time talking about their use cases.

    • @IAmTimCorey
      @IAmTimCorey  7 หลายเดือนก่อน +1

      That is absolutely part of the target audience. How do you think those decisions get made? If you have only ever built databases for small companies, why would you be qualified to recommend which database to use at a large company? You wouldn't. So how do you figure out which database type to use at a large company? Either trial and error or you listen to someone who has experience doing it. Who would that be? That would be me.