tag:blogger.com,1999:blog-16940011.post6492342144592539542..comments2023-05-18T07:00:11.972-07:00Comments on Yariv's Blog: ErlyDB 0.7Yarivhttp://www.blogger.com/profile/01787159103926738266noreply@blogger.comBlogger14125tag:blogger.com,1999:blog-16940011.post-9438372730326267682006-09-30T08:51:29.000-07:002006-09-30T08:51:29.000-07:00Looks good! Do you have any plans to allow automat...Looks good! Do you have any plans to allow automatic creation of tables from a set of field specifications, or will ErlyDB alwas require an existing database schema?ajrwnoreply@blogger.comtag:blogger.com,1999:blog-16940011.post-56379836944970695702006-09-30T13:38:16.000-07:002006-09-30T13:38:16.000-07:00Wow! This stuff is looking better and better! A qu...Wow! This stuff is looking better and better! A question, though: are there any plans to support database engines other than MySQL?Nick Thomashttp://nwthomas.com/noreply@blogger.comtag:blogger.com,1999:blog-16940011.post-57985684117227800122006-10-01T03:58:06.000-07:002006-10-01T03:58:06.000-07:00arjw -- I don't really see a compelling value ...arjw -- I don't really see a compelling value in schema creation from Erlang. It can't be that much easier than writing CREATE TABLE statements. Am I missing something?<br><br><br>Nick -- there are such plans, esp with Mnesia, Postgres and ODBC. However, these efforts will probably rely mostly on contributions from other developers as I don't have a strong need for them at the moment.Yarivnoreply@blogger.comtag:blogger.com,1999:blog-16940011.post-84393993149635577272006-10-01T14:52:41.000-07:002006-10-01T14:52:41.000-07:00Yariv,I like where erlyDB is going. My biggest co...Yariv,<br>I like where erlyDB is going. My biggest concern is namespace pollution. In anything but simple apps where your model objects are only used as rdb record wrappers, models end up with lots of functions for specialized domain behavior.<br>You are taking up lots of function names without having an approach for namespace collision. I assume you've thought of this and decided things looked more beautiful without prefixing functions with something like '_db_', so you would have '_db_table'/1 or db_table/1 instead of table/1.ke hannoreply@blogger.comtag:blogger.com,1999:blog-16940011.post-24968859932580183512006-10-01T16:17:56.000-07:002006-10-01T16:17:56.000-07:00your before_save and after_save functions do not p...your before_save and after_save functions do not provide enough resolution. In many cases, you need to know if the save was an update or a create. I recommend either offering additional before_update, before_create, etc... or have an optional parameter to the save hooks to pass the context of the operation. You could have a before_save/2 which can be used like:<br>before_save(Model, Context) where Context == update.ke hannoreply@blogger.comtag:blogger.com,1999:blog-16940011.post-23928044011202261992006-10-01T16:21:47.000-07:002006-10-01T16:21:47.000-07:00in addition to the resolution on save hooks, havin...in addition to the resolution on save hooks, having access to information in the after hooks for fetch, save and delete would be useful. This additional info would inlcude the number of rows effected by the operation.ke hannoreply@blogger.comtag:blogger.com,1999:blog-16940011.post-72056961995259916852006-10-01T16:51:27.000-07:002006-10-01T16:51:27.000-07:00Yariv: The nice thing about programmatic table cre...Yariv: The nice thing about programmatic table creation is that you can write to one (common subset) schema and maintain portability across different database servers. There's also the possibility for automatic database upgrades as new fields are added or existing ones are modified.<br><br>In particular I'm thinking of SugarCRM's "vardefs.php" files, which define various metadata for each of the database (and virtual) fields, such as the column type and size. The field descriptor also covers things like formatting conventions, for automatic conversion from the user's display/edit format to the database storage format - useful when handling lots of dates and currency amounts.<br><br>Perhaps this sort of thing would be better implemented as a layer over ErlyDB.ajrwnoreply@blogger.comtag:blogger.com,1999:blog-16940011.post-57818358104453734212006-10-01T16:53:50.000-07:002006-10-01T16:53:50.000-07:00Hm, clicking on the submit button seems to add a c...Hm, clicking on the submit button seems to add a comment without giving any feedback (such as moving to a new page). Inappropriate use of Ajax? :)ajrwnoreply@blogger.comtag:blogger.com,1999:blog-16940011.post-47177013447263144792006-10-01T19:48:22.000-07:002006-10-01T19:48:22.000-07:00One word: Whoah! Automatic table generation or ta...One word: Whoah! Automatic table generation or table migrations (a la Rails?) could be a plus, thoughDmitrii Dimandt aka Mamuthttp://en_dmitriid.livejournal.comnoreply@blogger.comtag:blogger.com,1999:blog-16940011.post-43424824469836664182006-10-02T05:09:13.001-07:002006-10-02T05:09:13.001-07:00Regarding schema generation -- it's simple eno...Regarding schema generation -- it's simple enough to do. Maybe I'll try to hack something for the next ErlyDB release. About namespace collisions -- I think the likelyhood of a collision is low enough for this to not be such a big concern. However, if it does happen, it can be annoying. I don't see it as an urgent issue, but maybe I'll find an easy way to add an ErlyDB prefix to generated functions for a future release. For hooks -- you can call the is_new/1 function of the domain modules to check for INSERT or UPDATE statements in the before_save hook. In the after_X hooks, they always apply to a single record. If the DELETE or UPDATE statements don't affect a single record, an error is thrown telling you how many records were affected in the database. Isn't that sufficient?Yarivnoreply@blogger.comtag:blogger.com,1999:blog-16940011.post-49291268417849475882006-10-02T05:09:13.000-07:002006-10-02T05:09:13.000-07:00Thanks for everybody's input!Thanks for everybody's input!Yarivnoreply@blogger.comtag:blogger.com,1999:blog-16940011.post-6741884228511309132007-03-29T23:59:06.000-07:002007-03-29T23:59:06.000-07:00@arjw wrt. database independence.IMHO not a great ...@arjw wrt. database independence.<br><br>IMHO not a great idea at all. Use the database to its fullest extent ! You never get as much security and performance for the buck as in the database itself.<br><br>[Disclaimer] I do Oracle DB-Development for a living.Norbert Klamannnoreply@blogger.comtag:blogger.com,1999:blog-16940011.post-45704390609927992752008-02-10T00:00:28.000-08:002008-02-10T00:00:28.000-08:00But then stopped, malin akerman nude that much lon...But then stopped, <a href="http://akerman.mypunbb.com" rel="nofollow">malin akerman nude</a> that much longer, be doing your facts.jwewymolusahttp://akerman.mypunbb.comnoreply@blogger.comtag:blogger.com,1999:blog-16940011.post-78756508328599525712008-11-09T10:38:28.000-08:002008-11-09T10:38:28.000-08:00Dog porn movies zoo porn movies animal porn movies...<strong>Dog porn movies zoo porn movies animal porn movies....</strong><br><br>Beast sex zoo sex animal porn. Zoo sex beastiality horse porn dog fucking....Bestiality porn zoo sex private photo and movies.http://esnips.com/web/ZooPornStreamMovies-africazoopornnoreply@blogger.com