Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What tables will be there.Also as read percentage will be significantly larger than write, is indexing on columns advised? What other precautions are necessary?

For now, I can just think of 1 table containing two columns namely domain and ip address and B+ tree index implemented on both. Is this sufficient?

share|improve this question

migrated from Mar 5 '14 at 12:41

This question came from our site for professional and enthusiast programmers.

Show what you've come up with so far. – simon at rcl Feb 28 '14 at 11:09
@simonatrcl I have edited about my approach. Please help me further. – SandV Mar 1 '14 at 8:15
That's OK as far as it goes, but if you're doing a proper DNS server you need to know a little bit more about it. some things would be reverse lookups, zones, different record types, and especially TTL. Start with this: – simon at rcl Mar 3 '14 at 9:55

A simple list of name/address pairs with an index on each would be sufficient if absolutely all you needed to do was lookup one from the other. Unfortunately you will find that the DNS protocol has larger requirements than that so if you intending to interact with the public domain name system you have much more work ahead of you. See for a quick primer and a list of the relevant RFCs (which are essentially the specification you'd be expected to work to as a participant in the public DNS infrastructure (though remember that many features are optional: you may chose to implement an authoritative service only so not need to worry about recursive queries (except knowing the right error response to give when you receive one).

There are a couple of F/OSS DNS servers that use a relational database back-end instead of bind-style zone files, perhaps you could look at their structures as a hint (though if you are building a commercial solution be careful of licensing issues: for instance you might find looking at GPL covered code to be a bad idea if you intend to distribute the results of your project in a non-GPL compatible manner):
Power DNS:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.