Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the essential dba skills a developer should learn?

Creation of objects like tables and indexes are fairly essential, even if the code has to be authorized or created by the dba. What other areas normally carried out by dbas should the accomplished developer be aware of?

like image 705
DBMarcos99 Avatar asked Aug 24 '09 10:08

DBMarcos99


People also ask

Which tool is used by DBA?

Best Database Administration Tools | phpMyAdmin, MySQL WorkBench & more.


2 Answers

A developer is responsible for doing everything that makes his code a) correct and b) fast.

This of course includes creating indexes and tables.

Making a DBA responsible for indexes is a bad idea. What if the code runs slowly? Who is to be blamed: a developer with bad code or a DBA with a bad index?

A DBA should convey database supporting operations like making backups, building the infrastructure etc, and report the lack of resources.

He or she should not be a sole person for making the decicions that affect the performance of the whole database system.

Relational databases, as for now, are not yet in that state that would allow splitting of responsibility so that developers could make the queries right and the DBA could make them fast. That's a myth.

If there is a lack of resources (say, an index makes some query fast at the expence of some DML operation being slow), this should be reported by a DBA, not fixed.

Now, it is a decision making time. What do we need more, fast query or a fast insert?

This decision should be made by the program manager (and not the DBA or developer).

And when the decision is made, the developer should be given the new task: "make the SELECT query to be as fast as possible, taking in account that you don't have this index". Or "make an INSERT query to be as fast as possible, taking in account that you will have this index".

A developer should know everything about how a database works, when it works normally.

A DBA should know everything about how to make a database to work normally.

The latter includes ability to make a backup, ability to restore from a backup and ability to detect and report a resource contention.

like image 180
Quassnoi Avatar answered Oct 06 '22 00:10

Quassnoi


The ins and outs of database storage and optimization are huge. Knowing how to index and partition tables well is invaluable knowledge.

Also, how to read a query execution plan. SQL is such a cool language in that it will tell you exactly how it's going to run your code, so long as you ask nicely. This is absolutely essential in optimizing your code and finding bottlenecks.

Database maintenance (backups, shrinking files, etc) is always important to keep your server running smoothly. It's something that's often overlooked, too.

Developers should know all about triggers and stored procedures--getting the database to work for you. These things can help automate so many tasks, and often developers overlook them and try to handle it all app side, when they should really be handled by something that thinks in sets.

Which brings me to the most important point, database developers need to think in sets. To often I hear, "For each row, I want to..." and this is generally an alarm in my head. You should be thinking about how the set interacts and the actions you want to take on entire columns.

like image 26
Eric Avatar answered Oct 05 '22 23:10

Eric