couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas de Bari Embriz Garcia Rojas <nb...@dalmp.com>
Subject help modelling my data (DNS zones)
Date Thu, 08 Oct 2015 08:27:28 GMT
Hi all, I would like to model my data in a way that I could take full
advantage of CouchDB, but I need some help to properly
"normalise/decompose" etc.

I would like to use CouchDB as a backend for a DNS, but would like to find
the proper way of storing millions of zones/domains.

My current working  solution is using mysql, in where I have just 3 tables,
one table contains the users (domain admin), domain names and he records
for the domain, for example:

table 1 (users):

uid, user, email
1, user name, user@emal.tl <wohali@atypical.net>d

table 2 (domains):

id, domain_name, creation_date, owner
1, domain.tld, 1998-11-02T05:00:00, 1

table 2 (domain_records):

id, domain_id, record, record_type,, owner
1, 1, www, A, 1
2, 1, mail, A, 1
3, 1, ftp, A, 1
4, 1, foo, A, 1
...

The thing that confuses me, and mainly is the reason for the one I am
writing to ask for help, is about how to deal with the domain records, for
small domains (less than 10 records) i don't see big problem, but for
domains with thousand of records, how could I manage the data, for example
the full .com?

I am wondering if is posible to  create a document per each record and use
a parent-child schema, rather than creating a single document for all the
records, maybe something like

_id = domain.com (parent document)

_id = sub.domain.com (child document)
_id = www.domain.com (child document)
etc ...

This seems the way to go, but for putting all the data together, how could
I query the database to build the entire zone, I mean how to get all the
documents "join" so that I can form from all the chunks a single zone.


Another approach maybe a single document with all the zone records, but I
think is not a the way to go since for for big zones (.com) when
updating/delating records this could become a problem, since the file would
be huge.

Has you may notice I am having issues finding/understanding how to relate
data with NoSQL, so wondering if you could please give some tips in order
to properly understand more and find a good solution.

Many thanks in advance for your time.

Regards

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message