The Stanford database course is using sqlite to experiment with SQL, Constraints, Triggers and so on. As the downloadable executable from this site only has a command line interface I decided to search for a GUI manager for sqlite. I am currently trying the firefox add-on which seems to work just fine.
/* First we create a table with a tuple constraint */ create table Apply(sID int, cName text, major text, decision text, check(decision = 'N' or cName <> 'Stanford' or major <> 'CS')); /* next we try to insert a few tuples but the 3rd one should throw a constraint violation exception */ insert into Apply values(123, 'Stanford', 'CS', 'N'); insert into Apply values(123, 'MIT', 'CS', 'Y'); insert into Apply values(123, 'Stanford', 'CS', 'Y');
Just to nitpick: it's sqlite (1 'l')
ReplyDeleteAnd the Firefox Add-on is a real treat. I'm missing just one thing: being able to start the add-on from the command line, without starting FF (my Chrome's open 24/7)
Oh... I guess I just had that spelling mistake somehow inprinted into my brain :) I actually will start using Chrome more as well.. the dev tools are awesome.
ReplyDelete