GuyBehindtheGuy
GuyBehindtheGuy

Reputation: 1368

What do databases excel at?

I'm trying to get my team to think about only asking the database to do things it can do really well. I believe that when they stop thinking of the DBMS as an omniscient, omnipotent being and start treating it as a useful--albeit dumb--tool, they can begin to approach optimization and database design with the right attitude. That got me wondering: what types of operations does a modern database excel at? I'll start the list with the obvious tasks:

Any others you can think of?

EDIT: Feel free to add database anti-patterns as well, such as:


Note for the picky: I do know the distinction between a database and a DBMS, but most people don't know (or bother) to recognize it, so I'm intentionally interchanging the concepts.

Upvotes: 2

Views: 255

Answers (3)

James Black
James Black

Reputation: 41858

To add to Mark Rushakoff's answer, it can manipulate the data, using several aggregations and groupings, to format and prepare the data that you need.

For example, in MySQL, I had a query that would select all the users that were logged, and the number that logged in for each time of day (24 hour clock), for a time period, to see when the highest load was.

The database will tend to be faster at doing these manipulations than an application, but these complex queries are very dependent on profiling and optimizing them.

Formatting the results is important. There is no reason for me to have to turn a datetime into a string when it can come back as a string, formatted as needed.

Upvotes: 1

pstanton
pstanton

Reputation: 36640

well, there's the most obvious one:

store a ****load of information in a convenient, organised and memory efficient manner.

Upvotes: 4

Mark Rushakoff
Mark Rushakoff

Reputation: 258278

One important one that you missed was aggregate functions: sum, average, min, max, count, etc. (At least, the database should be really good at doing min, max, count on indexed columns).

Upvotes: 5

Related Questions