score:0
well, mongodb and mysql are both gpl, and apart from the way you query the mongodb there are performance advantages in the way data is stored.
in mongodb , data is stored as data pages, which is a stuctured substitution of many dozens of tables in mysql, hence when you query the mongodb, you access the index lookup and retrieve data from the one page.
in mysql, for the same data, because it is laid out in a few dozens of tables, you would be doing dozens of index lookups, dozens of range lookups and dozens of data lookups.
hence, winner of the first round is mongodb.
i don't know much about hbase, but there is this great comparison graphs shown here where again, mongodb seems to have the upper hand.
score:0
perhaps a use case would be in order for answers to be more appropriate. generally the type of data and its use would dictate whether one uses sql(relational e.g. mysql) or nosql architecture(e.g. mongodb).
this article might help give direction.
....as programmers we can embrace what we’re given. most likely we’ll have our own opinions. i sure do. but if you’re doing something that lends itself nicely to sql tables, then we can get our job done. if you’re doing something that requires complex data structures and lends itself nicely to a nosql database, then we can similarly get our job done....
score:0
these days, happily, choosing a database can be an challenging exercise, because of the incredibly diverse landscape. here's a fun visual which highlights this point:
http://blogs.the451group.com/information_management/files/2013/02/db_map_2_13.jpg
the choice should really be driven by what's easiest to use from a developer skill and api perspective, the structure and size of your data, how often you write your data versus how often you read your data, what kind of acid requirements you need and lastly how your application needs to scale. i put scalability last, because in most cases, when you put scalabilty first the result is a solution without a problem. if it's a new application, you may not, in fact, really know anything about scalability requirements, so i would choose something that fits your other needs. since your application is built in scala might also consider the maturity and quality of scala-friendly wrappers available for the technology under consideration. this is especially important to think about if you decide to adopt a non-relational database, because you may have to give up the unifying jdbc api for which there already exist many scala-friendly wrappers.
since you specifically mention mongodb and hbase, i'm assuming you might have a reason to use a non-relational database. in fact, at this early stage, the hard choice you're faced with is really whether to adopt a relational or non-relational solution. if you choose a relational solution, then moving from one relational database to another can be relative easy. this is less true if you choose a non-relational database, because the apis differ greatly from one type non-relational database to another.
so how do know whether you need to adopt a non-relational database?
- do you have tables with many columns?
- do you have tables with few columns but many relations?
- do you have tree-like data where there are children with parents and ancestors?
- are you planing on storing structured data formats such as xml or json?
- do you foresee the need to frequently change the database schema?
if you answered yes to any of these questions you may be non-relational, but you're probably not a redneck. in this case, the second hardest question is which non-relational database to choose. again, choose based on your data structure and how well they fit with other technology choices, what acid properties you need, where your skills lie and what's easiest.
score:1
first of all, as others have said, the choice of your persistence layer depends on your use case.
in case you are looking for a sql solution, take a look at the overview on the so answer to "good examples of scala database persistence", which gives examples for:
- slick,
- anorm,
- circumflex orm,
- squeryl,
- o/r broker, and
- querulous.
you might also want to look at the sorm framework.
for slick, there is a promising project, play-slick, that helps integrate it into the play framework.
Source: stackoverflow.com
Related Query
- Suitable database and webserver for scalable web application
- What is proper design for system with external database and RESTful web gui and service?
- Trying to create Unit tests for Slick database for Play web application in Scala
- Performance problems using Squeryl and H2 database for a desktop application
- How is Scala suitable for Big Scalable Application
- How to write database-agnostic Play application and perform first-time database initialization?
- How to use actors for database access and DDD?
- Using Apache Spark as a backend for web application
- Play & Akka and blocking threads for database access
- best web database solution for scala for a high traffic site?
- Spark driver node and worker node for a Spark application in Standalone cluster
- Is Wicket a suitable Web java framework for Single Page Applications?
- Organizing and analyzing logs in an asynchronous Scala web application
- How to configure SBT to produce separate jars for dependencies and application code?
- LIFT setup for web project: generate with mvn, and manage with sbt
- Where to put a user-editable database connection string for a Scala Lift web application?
- Play Framework: use h2 database for development and postgresql in production mode and how to connect to the postgresql via conf-file
- Design pattern to change database for production and test environments
- Scala Play and Slick. Writing Form Mapping and Database Mapping for an object
- Set spark.driver.memory for Spark running inside a web application
- How to wire input and output when creating flow for web socket?
- Build tool for Scala web application development
- Choosing hosting solution and deploy tool for Scala (Lift) based application
- Scala Idiomatic and Fastest way for consuming multiple web services and merging output
- java/scala web application and psexec
- Which technology stack to use for car pooling over web and mobile
- Play Akka Actors web and non-web application working together
- Injecting a JDBC Database connection in a Play for Scala standalone application
- Docker and http url of started web application
- Scala and Play framework Web Application hosting
More Query from same tag
- Avro Serialization from generics
- case classes in scala gives me runtime exception
- How Play Framework handle CloseEvent from WebSocket?
- Gatling/Scala is unable to find JSON retrieved session key
- Declare a null var in Scala
- scala lift json: pattern match on unknown data?
- sbt- ManagedStyle.Maven
- Difference between a function and a method in terms of Functional programming
- Unable to make connection to MongoDB using MongoDB Scala Driver
- NoSuchMethodError on new StreamingContext
- Deriving a Cats Order for Scala's Enumeration
- Scala's compile-time type constant to use pattern matching
- How to count number of rows in a spark dataframe based on a value (primary key) from another dataframe?
- Converting Python to Scala in Spark ML?
- What's the difference between currying and multiple parameter lists?
- Sending outbound HTTP request from Akka / Scala
- convert a byte array to string
- Can't expand macros compiled by previous versions of Scala
- Scala by Example: spawn function in scala 2.11.7
- could not find implicit value for parameter timeout: akka.util.Timeout
- Why do .map.flatten and flatMap on a Scala Map return different results?
- Set an implicit function return in Scala
- Import external library in Scala
- The type requirement [B >: A] for ++ operator in Scala Lists
- Error when Spark 2.2.0 standalone mode write Dataframe to local single-node Kafka
- Case classes matching in Scala
- Modifying free variable inside a closure in Scala
- Ordering with algebraic types in scala
- recursive function not recognizing initial input in scala
- Why my implicit function parameter does not work?