to my understanding the switch between different relational databases
when using Mapper is just a matter of changing a few lines. First adding
the dependency to the project description and then changing the database
connection settings in the properties file. For example if i wanted to
switch from MySQL to PostgreSQL it would require these five lines:
val lift_postgresql = "postgresql" % "postgresql" % "8.4-701.jdbc4"
db.driver=org.postgresql.Driver
db.url=jdbc:postgresql:DATABASENAME
db.user=USERNAME
db.password=PASSWORD
What is the cost if I am using Record and I want to migrate from MongoDB
to CouchDB? How many lines do I have to change? If the cost is
significantly higher, can the migration be automated?
Cheers, Stefan
-Ross
> --
> You received this message because you are subscribed to the Google Groups "Lift" group.
> To post to this group, send email to lif...@googlegroups.com.
> To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
>
Stefan
Am 31.08.10 00:33, schrieb Ross Mellgren:
Cheers, Tim
Stefan
Am 31.08.10 10:20, schrieb Timothy Perrett:
Can you please give concrete examples of what I would have to change in my implementation? I don't mean developer designed explicit queries, but the parts where the framework automatically provides persistency mapping for the models.
That surprises me because of two reasons:
1. In "The Definitive Guide to Lift" the authors state: "Record is a new refactorization of Mapper that is backing-store agnostic at its core, so it doesn’t matter whether you want to save your data to JDBC, Java Persistence API (JPA), or even something like XML. With Record, selecting the proper driver will be as simple as hooking the proper traits into your class."
2. MongoDB classfies itself as a "Document-oriented storage" with "JSON-style documents" and CouchDB classifies itself as "A document database server, accessible via a RESTful JSON API." which corresponds to Wikipedia classifying MongoDB and CouchDB as "Document-oriented database" with "JSON(-like) documents". Effectively MongoDB uses BSON which is a binary version of JSON, so to my understanding the document format should be the same.
That surprises me because of two reasons:
1. In "The Definitive Guide to Lift" the authors state: "Record is a new refactorization of Mapper that is backing-store agnostic at its core, so it doesn’t matter whether you want to save your data to JDBC, Java Persistence API (JPA), or even something like XML. With Record, selecting the proper driver will be as simple as hooking the proper traits into your class."
2. MongoDB classfies itself as a "Document-oriented storage" with "JSON-style documents" and CouchDB classifies itself as "A document database server, accessible via a RESTful JSON API." which corresponds to Wikipedia classifying MongoDB and CouchDB as "Document-oriented database" with "JSON(-like) documents". Effectively MongoDB uses BSON which is a binary version of JSON, so to my understanding the document format should be the same.
I'm not sure quite sure what you mean by complex queries, but concerning CouchDB this looks quite promising to me:
http://guide.couchdb.org/draft/cookbook.html
If the nosql hype reaches the plateau of productivity and standard query
languages for document databases and key-value stores evolve will there
be a chance of homogeneous query interfaces for the different nosql
database types?
> Hope that clarifies
Yes, absolutely, I think I have a rough understanding of Lift
persistency now. Thanks for your helpful advice!
Cheers, Stefan
Maybe! In some respects, the variety is nice, because it allows the various folks to pursue different innovative query strategies that won't wedge into SQL or something similar. I suppose after a time we'll implement a very light abstraction for standard CRUD ops and "select all / select one by id" so that we can build things like CRUDify/CRUDops on top of Record.
-Ross
>
>> Hope that clarifies
>
> Yes, absolutely, I think I have a rough understanding of Lift persistency now. Thanks for your helpful advice!
>
> Cheers, Stefan
>
Cheers, Tim