Ideal storage location for coldfusion shopping cart [closed] - database

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I currently have a ColdFusion shopping cart script I have written which stores all of the users items in a session variable. Looking through it, I'm wondering what if there is a more robust solution for shopping cart data? Is it better to temporarily store cart data into a db table or to store the cart data in the users session?
My cart currently houses several hundred array items as the site I have is quite big. So I guess I'm wondering what is the better solution, DB or session ?

I would make the cart data persistent in the database.
This has 2 main advantages: it adds business value and reporting capabilities, allowing you to (for e.g.) analyze which carts are abandoned. The second advantage is that you can cluster your application more easily, over different clients, and your application will need less operative memory to run, allowing the application's memory behaviour to be more predictable.

Both options are OK, the choice depends on your priorities.
Database would be interesting if you intend to keep the carts longer than one session.
You can also consider using something like Redis to persist user sessions (across several CF servers).

Related

Should I Store User Data Locally Or Server Side DB? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I'm working on a 'mental wellness' app, functionality for which includes things such as making journal entries (typed and voice recorded), recording affirmations, creating to-do lists, setting goals/targets etc.
My question is, should I store the user data from the above such actions locally, which gives the user a greater sense of control over their privacy or should I store it on our server in an encrypted DB?
My initial instinct was to go both to allow users to use to do things such as make journal entries even without internet connection, which can then send that data to server/DB once online again. But wasn't sure if this was a major drawback in terms of users privacy i.e. their 'private' journal entries being on our server/DB, albeit encrypted and widely used facilities i.e. AWS, Firebase, Azure. The obvious benefit of having it on server side DB is that they can use different devices such as phone and tablet or can have access if they move to a new device e.g. get a new phone.
But then the alternative I thought of was having users data all stored locally on device and then allowing them to sync to their iCloud or Google Drive or having the app auto sync. Is this a good alternative or compromise?
Is there a preformative benefit one way or the other?
I would appreciate your feedback on what you would consider the best route from both a user experience perspective as well as the technical best practice.
Many Thanks

Where does an app / website hold its data? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
For a small start-up mobile app/website what options are there for storing its data? I.e. Physical server or cloud hosted data base such as azure.
Any other options or insight would be helpful thank you!
Edit:
For some background I'm looking at something that users could regularly upload data to and consumers could query to find results through an app or website.
I guess it depends on your work load and also on the your choice of data store. Generally, SQL based storage are costlier on cloud based solution due to the fact that those can be only vertically upgraded whereas no-sql ones are cheaper.
So according to me you should first decide on your choice of data-store, which depends on following factors:
The type of data; is your data structured or it falls under non-structured category?
Operations that you will perform on the data. Do you have any transactional use-cases?
Write/Read pattern; is it a read heavy use case or a write heavy one ?
These factors should help you decide on an appropriate data-store. Each database has its own set of advantages and disadvantages. The trick is to choose one based on your use cases and above mentioned factors.
Hope it helps.

NoSQL database service for storing hundreds of gigabytes? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I'm building an app, that will need to store approx 100-200GB of JSON data per month with ~20.000 write operations per minute.
Is there any service that won't require millions of dollars to store this data?
One option is to use Azure's HDInsight. You'd pay for the HDInsight servers in addition to the storage of the data. Of course your costs will keep climbing as you add more and more data, so some form of archive would make sense. How long do you have to keep data easily available?
HDInsight Pricing
Storage Pricing
I think you may be overestimating your data growth. I would start with either AWS or Azure and build my own datacenter if volume goes near the level you are talking about. Yes this involves some migration later on but its always good to grow by observation.
Thanks everybody. After all, I decided to go with Azure Table Storage.

Is PhoneGap's DB good enough for versioning like CouchDB? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I'm trying to figure out if http://docs.phonegap.com/en/1.2.0/phonegap_storage_storage.md.html can handle versioning, conflicts, etc. similar to CouchDB's capabilities.
I'm building a mobile app wherein friends can share data. This data will be manipulated (add, edit, delete) when the app is online or offline. During offline operations, the data changes will be stored locally -- and then sync to a central database when it goes online (and everyone else will sync to that central database).
Obviously, there will be versioning, conflicts, etc. issues. CouchDB supposedly handles this well. However, I want to know if PhoneGap's storage is sufficient for my needs. Will it work or not?
sqlite has plenty of power for this kinda stuff, though even localstorage is pretty powerful unless you are manipulating data with heavy javascript. I say try localstorage first as it's very very easy to handle.

Should remove old records from a DB? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Every time a certain form in a site dashboard loads, I generate a unique ID and store it into the database, when the form is submitted I mark the ID as "used" and don't allow to submit forms which are already used.
Question: Is it worth to store date/time of form load and remove unique IDs say two weeks old?
Or to keep this data in MySQL forever?
I think saving timestamp and clearing out old dara is an excellent idea.
Without that, your web site is not scalable. In fact it could be attacked by repeatedly loading the page and filling your database's disk to capacity, effectively killing your site.
Wether it is worth to store the date-time of the form in the database is up to your decision and your business needs, but, you should not keep any data stored, in the on-line database, which is not needed any longer.
If you need to keep such data for historic report purposes then create an off-line/report database and transfer the data, periodically, from the on-line to "report" DB.
The less amount of data you have in your db the faster your RDBMS will be to retrieve/manipulate it.

Resources