Saving multiple pictures for a website that will work like an ecommerce [duplicate] - mysql

This question already has answers here:
Can I store images in MySQL [duplicate]
(4 answers)
Images in MySQL
(5 answers)
Closed 9 months ago.
I am developing a website that will work a little bit like ecommerce. It is a website where people will upload picture of items they want people to buy. My challenge is that when learning Mysql database storage, I learnt that mysql can store pictures but it is better to use it for only profile pictures. Storing large amount picture in mysql will slow it down. Please, what do i use to store these pictures and how? I have learned PHP, JSON and mysql

This question comes up regularly and the short answer is: it depends. It's a question of weighing up between an "all-in-db approach" and "which component can do what best". The bias seems to be towards "store in file system". It further depends on the average size of your images and your MySQL setup. Make sure to read up on the BLOB field type and object storage in general.
Storing images in MySQL
Storing image data in a MySQL database?
From your question I can't really tell where on your developer journey you are. But given your comment it might be helpful to point out that MySQL isn't a ready-made web-app in itself. MySQL can be one element in a solution stack (LAMP for example) and be the "database part". In a web-app where front-end code collects a user's uploaded data, your code can then store this user data into a back-end system like a database, which is MySQL, or into the file-system - that's on you as developer.

Related

What type of backend to use for iOS app [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 7 years ago.
Improve this question
I've created an app for iOS using Swift that is essentially a Latin dictionary. Users have the ability to create new words that aren't included in the app. The data is stored locally in the app's document directory in two SQLite databases. The first one holds the words that ship with the app. The second holds the words that are created by the user.
I want to have each word created by the user uploaded to a server at runtime and added to a master database of words. That server would then compare each incoming entry to William Whitaker's Words to see if it is in fact a valid Latin word and then to see if it is already in the master database. If it is valid and not already in the master DB, then the word would be added.
After every new entry to the master database, the server would generate a new SQLite database that includes the new word. Every time the app runs it will check for a newer version of the StandardData.sqlite file and if there is one, it is downloaded. Words that are common to the Standard library and the user's custom library would then be deleted from the custom library to prevent duplicates.
Over time a large library of Latin words would be created without me having to manually enter them in from a dictionary.
I'm somewhat familiar with MySQL (When using it with MySQL workbench) but beyond that I'm mostly unfamiliar with today's web programming tools: HTML5, CSS, JavaScript, Java, Ruby, Rails, PHP, etc. My budget is 0$ and ideally I would like to host the server on my own hardware. What is the best way to add a backend to my app?
This is a question of opinion, so I'm not sure this is the best forum. However you have several options, including some that could be completely free.
Rails and PHP as you have mentioned can be used to create a backend using mysql as the data layer. If you are new to both of those languages, you might look at Python using one of the many frameworks for it. If your app is completely iOS based, you might also look into using CloudKit, which is free up to certain sizes (which it sounds like you could easily stay below). The advantage of CloudKit would be that you don't even have to host the service on your own hardware. There are a few other similar options as well, included Firebase and Parse which both have free tiers that likely would provide all the storage you need.
With any of these three, you'd be using the API in swift in your iOS project, and not having to learn a new language.

Connecting MySQL database to Mac app

The question is pretty simple, however it seems like there's a million variations on the answer, therefore although this question has definitely been asked before, I'd like to ask it again in the hope that an up-to-date answer can be sought.
Basically I'm creating a Mac app and part of it will be powered by data that I have in a remote MySQL database as part of my site. My question is this: what is the best way of connecting to that database so that the data can be used in my app?
I have read many answers that suggest using a web service to convert the database to JSON or equivalent and then converting that into objects that can be used via Core Data is the best way, however the data that I want is 'dumb', i.e. I won't be changing or manipulating it in anyway, therefore I think Core Data is potentially overkill for what I need.
Are there any other more straightforward ways of achieving this task?

.sql script to load MySQL with sample schema and data? [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Is there a “Northwind” type database available for MySQL?
Microsoft has the Northwind database to provide a sample database with sample data. I'm aware of how to create a script to do something like this for a MySQL database, but am wondering if such a thing already exists.
I've got a few applications I want to create as a learning exercise for myself.
Is anyone aware of a script for MySQL that will create a sample database(s) and populate it with a good amount of sample data? I'm looking for something with more than just a couple of tables with a couple of rows.
MySQL has some sample databases available for learning, most well known are world and sakila. You can download them at http://dev.mysql.com/doc/index-other.html.

How to make a simple API from AS400+DB2 IBM in order to sync data with an external website+mysql? [duplicate]

This question already has an answer here:
Closed 11 years ago.
Possible Duplicate:
Is possible to create a cron-job on a as400 system (IBM) in order to update/insert large quantity of data on online server?
I have an AS400 system using DB2 on IBM Series and I would need to sync this data with another database that is hosted on another domain for a website.
We have all the articles on the AS400 system and I would like to update the stock in the website. It should be the most accurate possible and automatic too.
RPG can make use of JDBC. So you can write a RPG/Java program that can sync with the MySQL.

Can someone explain the concept of MySQL to me? [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
First and foremost, I do understand that MySQL is used for databases, and can be used to update content on a website. What I don't understand is how you actually are able to get MySQl to change the content on a site automatically, or if it is even possible. I really am a beginner so sorry if this question comes comes as noobish. I really don't understand the concept of MYSQL all that much, as I don't understand how websites are able to change the content on their main page daily using MYSQL, Now what I am saying is, if I were to have a website with new information every single day on the main page, and used Mysql as a database, would it be possible to upload for example 7 html files one for each day of the week,to the database, and have each of them displayed on different days, automatically? (This is all a presumption as I don't know how to get the data into a mySql database and if you upload a html file to the database) Sorry for the confusing question and thanks in advance for all the help.
As you mentioned, MySQL is just a database. You could in theory use Oracle or SQL Server or PostgreSQL, which are all MySQL's "competitors", if you will, in the database space.
What's generally done is that there is a program that sits alongside the web server on the box that reads the content from the database and then translates that content into HTML, where it's served up to you as a web page. This program is usually referred to as a Content Management System or "CMS" (You might want to Wikipedia for "Drupal", which is one popular CMS out there).
Web pages are rarely stored as whole HTML files in MySQL. Usually what's done is that the content (paragraphs of text, comments on a blog, upvotes and downvotes) are stored in some structured format, and the CMS takes that structured data from the database and presents it to you. The upshot of structuring the data in this way is that end-users who want to update content don't have to worry about coding the HTML -- they just write their content and the CMS takes care of the presentation bits.
MySQL is a database server, and doesn't have any web-related functionality built in. It's just a place to store data (though it's very good at that - it, and other relational database management systems like SQL Server and Oracle, attempt to optimize data storage and retrieval).
There's a layer between the database and the web server that you're missing - the web application framework. That's where your logic goes. If you want to display different data based on the day of the week, you'd program that in your web application:
// ludicrously simplified
if (Date.DayOfWeek = Friday)
Output "<html>TGIF!</html>"
PHP and ASP.NET are the best known languages for this kind of development.
There are a number of frameworks out there that simplify certain tasks. You can write HTML more or less directly from your code, using the languages above and the right runtimes (the ASP.NET runtime comes with Microsoft's IIS web server, and Zend is popular for PHP). Or with the right tools, you can specify the content each user sees at a very high level.
You can have some code/algorithm to rotate the news (articles) in your home page. Those articles can be inserted/stored into your MySQL database.
What I mean by rotate is that for each day a given article is retrieved from the database and shown on your homepage.
The articles can be inserted by hand on a given table in your MySQL database or they can be inserted using some kind of front end (a user form) for that purpose.
For a complete overview of MySQL, this page on Wikipedia is a good hit.
I don't know if the other answers have helped you understand, so I'll add a very simplistic answer that I hope will get you over the initial bump.
MySQL will act as an online storage space for you, but it won't provide the website.
In between MySql and the website, there will need to be a program of some sort.
There are many, many different languages and frameworks available to do this, and it's essentially the entire business of web developers to create these programs.
In your particular case, you asked about uploading different pages to MySql and having them displayed for each day of the week.
You wouldn't need to use MySQL or a database at all for this, a few lines of code in most common languages would do this for you, and adding a database would simply add complexity where it wasn't needed.