Does Couchbase have the concept "required field"? - couchbase

Is it possible in Couchbase to declare a rule that the record cannot be saved if a particular field is null? I am actively researching at this very moment, but a quick answer would be appreciated.

No it does not. Couchbase does not today interrogate the data you put into it to the level you are asking about. So what you are asking for would have to be application level logic.

Related

FindAndModify using Couchbase

I have a collection of documents that need to be processed by multiple client nodes.
Basically, each document should be processed by only 1 client node.
So what I'm thinking of is creating a unique clientId for each node and set the clientId to the document being processed to tell other clients that this document is being processed.
I already implemented this approach using Mongodb a couple of years ago by using the findAndModify operator which guarantees the atomicity of both setting the clientId to the document and returning it.
Now I'm looking for a maybe similar approach in Couchbase but couldn't find.
Any idea on how to do it?
I think what you are searching for is the method called getAndLock. It will guarantee that only one server is reading this document.
Updating the document with an attribute might be a bad idea if the server fails during this process, as no other server will take over those documents that have already have been assigned to the faulty one.
We have handeled similar kind of scenario in our project. What we do is to create one document and save other processing doc in that. If that document is not present in that, then it you can prevent it getting updated by other client.

MYSQL: How can I gain security at row-level?

I'm working on a project that involves researching about how to gain fine-grained access control (FGAC) in MYSQL database.
From my searching, I think that FGAC related to security at the row-level in MySQL. However, I've looked through many websites but I can only see one method which is using VIEW in MySQL.
Reference: https://www.sqlmaestro.com/resources/all/row_level_security_mysql/
I think there are still a lot of other methods to gain row-level access control, am i right?
Can anyone show me other methods as if there is only one method, it would be very little for me to write on my document.
Ps: Any limitations related to that method is also valuable for me.
There are products (open source and commercial) that address these use cases. The area is known as dynamic data filtering or dynamic data masking. Data virtualization is also a technique that can achieve what you want.
Look into Informatica, Axiomatics, Denodo, and others

Exposing data from oracle database for web-service use

I've got a question related to oracle database and working with an API/web service to extract data from said database for use.
My experience in the area is limited so I'm hoping for some discussion here about it. My goal is to create a web service that has several fields and the should all fields submitted match an entry in the database, the program should return something positive, lets just say "true". If false, it will identify that there is a problem with the input.
My understanding right now is I can first use an API to expose the data, which I can then manipulate and query-check with a web service? Correct me if I am wrong with this general/overall plan. Moving on from this, if anyone have any relevant advice or programs that might prove to be useful here, but the main goal of posting this is to get a high-level understanding of the process.
Also, the plan is to use REST/JSON services here. Thanks all.
I am also not very skilled yet but if I correctly understand your question the answer could be ORDS
I found many essential informations here
With ORDS is possible to POST a request associated with a store procedure that do all the validations that the client can't do.

Sync database on ipad with remote database

I have an ipad app that has a database. I created a web-service on my mac mini using php,apache,mysql.
What I would like to do is sync the database on the ipad with the one I have on the remote computer maybe once everyday. Can someone please provide me with an example,sample code or even advice on how to go about doing this?
I would need more info to give you an accurate answer. What kind of database are you using ?
I can only give you a general answer since you really don't provide a lot of info,
What you would usually do when you need to send/request data from iOS to a Web Service, is send an HTTP Request using NSURLConnection or other wrapper classes such as AFNetwork.
Also the term "syncing" is quite a big subject, what do you mean by syncing? Always making sure the data on the iOS Database is the same as the web service database? If so you could have the client save some sort of E-Tag (last modified date), and ask the server only for data from that day onwards. Or the other way around, depends on the type of syncing you wish to accomplish.
I hope some of this makes sense for you, since your question was really general, my answer features a bit of general info , but might be helpful for you :)

Teach an M.B.A. the intricacies of Microsoft SQL Server (and how's it different from MySQL?) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 9 years ago.
Improve this question
I haven't had to interact w/MSSQL much in my development career, though I've spent many an hour working with MySQL.
An M.B.A. friend of mine is starting a job where she needs to gain functional knowledge of MSSQL Server, and I'd really like to help.
What are the differences between MSSQL and MySQL?
How would you recommend a non-technical person go about learning the ups and downs of MSSQL Server?
[update] Previous database design skills are naught. I've given her to short and long on what a database does from a high-level.
I'd love to say, "you can't". But that would be untrue (or at least mean).
If she has any background with database design at all, then this is merely a new RDBMS.
If she's never done database design, the place to start is not so much with MS SQL, but with how databases work, in my opinion.
Database Design for Mere Mortals is a good place to start. From there I'd move to an MS SQL -specific book, such as Microsoft SQL Server Unleashed.
Download the free SQL Express and start using it. Microsoft also has several video tutorials that would be helpful. They start pretty much from the beginning with "What is a database" and move to more advanced topics.
From the perspective of the database user, the backend is generally irrelevant if they understand some basic concepts.
First and most important concept for the non-technical user is GIGO (Garbage in Garbage out). Bad data is useless data. Check everything you enter into a database for correctness. You really don't want the customer's product to be mailed to San Diego, VA instead of CA.
Then next most important thing is to really understand your user interface and how it works. I've spent a lot of time fixing up junk because users didn't know what they were supposed to put in fields in databases (it would have helped if the developers had not allowed non-email type data to be entered into the email field, but you can't send an email to 757-111-6789). It is never a good idea to put the wrong kind of data into a field because you don't have another place to put it. As a user, you may have no idea what the database is going to use that data for and wrong data can completely stop a process or break something really important. If you don't know what to put in a field, then ask. Don't put junk into a field just because it is required. (Hint, it is required for a reason, that usually means this is data critical to the operation of the database, do not fake this information.)
Now if this person is doing reporting, then the critical concepts become understanding boolean algebra and a very strong undertanding of joins. If you have these two concepts down pat, you have 80-90% of what you need to query a database.
The specifics of the database supported also become important. You need to understand what is stored in what tables (or what views to use) and how they relate to each other. Coming into a new job, I would sit down with the developers if possible and get an overview of the design and whatI would need to know to get the data. I would review existing report queries to see how the data is currently being retrieved and use that to ask questions if I don't understand what the person did. Even a database expert will need to spend some time doing this when faced with a new database, so there is no reason to be shy in asking these questions when you are new.
Final thing is to learn how to report a problem to the developers. Problems that are not reported don't get fixed! Problems that are not reproducable because the user didn't provide screen shots and a context for what she was doing when the error occurred, don't get fixed either. New data fields that are needed as business requirements change, don't get added to the database until the developers know about them (Please ask for a Notes field if you need it instead of entering junk data into a field like email that you personally are not using for instance). New business requirements often require a lot of work in the backend to change how things work, it isn't as simple as adding a field on a form. Please be aware of that too when you make requests.
I learned from Robert Vieira's Professional SQL Server 2000 Programming -- well written and comprehensive. I am pretty sure the 2005 version is very similar, just updated. Despite the 'professional' label, I found it a great intro (I had practically no database experience at the time).
Also I second Erikk's comment. Download SQL Express and PLAY!