Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you maintain a library of useful SQL in a team environment?

Tags:

sql

At my work everyone has sql snippets that they use to answer questions. Some are specific to a customer, while some are generic for a given database. I want to consolidate those queries into a library/repository that can be accessed by anyone on the team. The requirements would be:

  1. Accessible
  2. Searchable
  3. Tagable (multiple tags allowed per sql)
  4. Exportable (create a document containing all queries with certain tags)

I'm interested in what has been found to work in other team environments.

like image 576
elmnoise Avatar asked Oct 15 '08 14:10

elmnoise


2 Answers

You could use a wiki.

You could get started with something as simple as Tiddly wiki.

like image 65
johnstok Avatar answered Oct 21 '22 13:10

johnstok


A wiki is a great approach.

For database specific or project specific snippets it's also very useful to have links to where a similar construct occurs in the code. We use trac's wiki which gives nice integration with out SVN for this.

like image 32
Bell Avatar answered Oct 21 '22 12:10

Bell