You are not logged in.
Pages: 1
I need to setup a dns server so I grabbed powerdns and postgres from the repos.
I found this guide
http://www.idimmu.net/2008/10/10/Using- … untu-Gutsy
but when I got to the part of insterting my specific hostnames it doesnt allow it for some reason.
insert into records (domain_id,name,content,type,ttl,prio) values(1,'myservertest','myserver','NS',86400,NULL)
It errors and says: insert or update on table 'records' violates foriegn key constraint "domain_exists" key domain_id is not present in table "domains"
--EDIT---
bah, I also tried something called poweradmin to setup the database but stuck on step 4 "updating database..." and gave up after 30 mins.
Last edited by darthaxul (2009-04-15 07:25:53)
Offline
ahh. referential integrity. smells so clean.
so yeah. you just have to have something in the domains table for your domain, before you can add records for that domain. looks like that website you linked left out that step.
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline
What cactus said... Instead of storing 'foo.com' in the 'records' table, the database stores it in the 'domains' table with a Primary Key (eg, '1'), and then references the key '1' in the 'domains' table from the 'records table.
Data integrity -> If 'foo.com' was stored in the 'records' table for each record, then it would be easy to accidentally create a record for 'fooo.com' and spend hours trying to figure it out.
Sanitising Data -> (Not Satanising) Why store 'foo.com' 100 times for 100 records? When you can store '1' instead? Doesn't really make a difference in a database this small but in very large databases, it can save space.
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Pages: 1