Answer the question
In order to leave comments, you need to log in
Why are different DBMS needed when you can use language data structures like dictionaries and lists in python?
With the help of dictionaries, lists, sets, tuples, you can completely replace the database for any task. So why bother, study various databases, subds, if you are fluent in the same python? The question may seem silly to you, but I'm really wondering why people use the database? Because of the speed?
Answer the question
In order to leave comments, you need to log in
If the entire set of functions provided by the DBMS is implemented on the structures of the language, then a new DBMS will be obtained. Why waste time and effort on writing a DBMS, if there are already ready-made ones?
1. The DBMS kernel works with data in a different structure than you work with lists and all sorts of tuples.
The DBMS can process much more data and much faster than you do it in python, at least thanks to indexes (read about indexes).
2. In addition, your sets and tuples need to be stored somewhere, where? As a .txt or .json file on your computer? Don't you think that this is a little unreliable?
3. In the database, you can set many restrictions and checks, for example, for the uniqueness of the data (so that each person has their own id), for the incoming data to correspond to the required types, checks for NULL values, as you will do all this through .txt files ?
4. The database has the concept of a transaction, which, of course, your files will not give you either.
5. Data with the help of a DBMS is easy to read, since it is presented in a tabular form, it is convenient to apply filtering, sorting, and various connections between tables to each other.
6. And a dozen more different benefits, which do not even make sense to talk about.
Main reasons:
There are many reasons, for small projects you can even write in .txt. But on larger ones, you can no longer do without a full-fledged database. Imagine that all VKontakte users, their posts, messages, photos, music and a ton of other things are stored in one dictionary users
in python.
bituke , I'll bring in my "five cents".
There is a cool report from Raymond Hettinger about dictionaries. Check it out.
In his presentation, Raymond talks about dictionaries in Python and draws an analogy with databases.
<<Link to the report>>
Content of the report: 90% python, 10% humor and ... does not contain GMOs)).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question