May be the community can help by sharing programming techniques and OO patterns when dealing with Couchbase java SDK .
Anyone like to share implementations of Lookup Pattern Example and Counter-ID Pattern and Dao implementations etc .
I am interested in plain Java without Spring -Data but anything people share is welcome even in other languages.
I’m looking in general for couchbase Java examples in general to get ideas on Data modelling .
In particular, if you’re using Couchbase 4.0, there is a good Java SDK example called try-cb-java that makes use of a sample bucket included in Couchbase 4.0. A direct link to this repository can be found here:
You don’t need to use Spring. In fact I was only using Spring-Boot to make a more appealing demo. It is less appealing to see Couchbase in action via a command line driven application.
Did you have a framework you preferred to use when it comes to Java? If you’re looking at the try-cb-java blog post I did, just ignore the stuff in the Application.java class (that relates to Spring) and look at the stuff in the Database.class which is pretty generic.
Yes is does.I have a question if ok to ask .
How would you deal with more complex relation ships and using lookups and the Key management if you have a composite keys what you think is a good strategy .
Assuming I understand your question and the ERD that you listed, you can have several ways to model your data and your intention would better decide which way is best.
If you wanted to keep things similar to an RDBMS you could use whats called referred documents. If you wanted to keep like-data together you could use embedded documents. There are trade-offs in each. Then of course you could model your keys many different ways.
I encourage you to watch the following video as it should explain a lot:
Cool staff. That’s it !!! it really helped me You see I understand it in theory and at Example level just like to talk to others about ways to implement it as we can use different ways I guess we all implement in our own way as we see fit for our project .
I am implementing large scale project so I need to consider writing helper methods and a Data Access Layer that we can base our business layer on and its interesting challenge on how to do it . Once i get further along I should report back my input too. For now big thanks