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

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.

Related

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

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.

how to insert data from a table in SQL server into another table in MySQL db [duplicate]

This question already has an answer here:
Inserting from MS SQL Server to MySQL database
(1 answer)
Closed 5 years ago.
I've created a website with CMS magento2 and I'm working with a MySQL database. now I need to connect it with SAP database which is a SQL Server DB. my question is how to insert data from a table in SQL server into another table in MySQL DB?
You need to use a linked server.
This question was already answered here: Inserting from MS SQL Server to MySQL database
You have two options:
You can create a restful API that receives the serialized data from one db and formats the data before pushing the data down to the db you want to use. The good thing about it is you can easily share data between the 2 DBs without having to worry. Quite flexible because the tables can be identical or not depending on what you need.
You can use the SIS ( Server Integration Services) tool present in the SQL Server that allows integrations into other database systems. It is a bit technical but here are a few steps you can follow on link to explain the integration of SIS packages with MySQL.

Recreate MySQL database in SQLite [duplicate]

This question already has answers here:
Export a MySQL Database to SQLite Database
(8 answers)
Closed 7 years ago.
I have a MySQL database that I would like in SQLite for an app I'm planning to develop. How would I go about this? Thanks.
I saw the previous question Export a MySQL Database to SQLite Database
However, there was no accepted or definitive solution. So what would be the best approach to doing this?
OK, my solution: (hope somebody finds this useful)
Installed DB Browser for SQLite from http://sqlitebrowser.org/
I exported the MySQL structure (without data) as SQL.
Then cleaned up the SQL according to this link
http://livecode.byu.edu/database/mysql-sqliteExport.php
Then in DB Browser for SQLite imported the cleaned up SQL to create the database and all the tables. I found that DB Browser for SQLite didn't allow importing of CSV data into the already created tables. So I went to the Apple App Store on my Mac and bought and installed SQLPro for SQLite app ($12 Australian...).
In SQLPro for SQLite I opened the SQLite database created in DB
Browser for SQLite.Then exported each MySQL table as CSV and
imported those into each existing table in SQLPro for SQLite.
Done
Although I've only used sqlite in an Android environment, I would recommend looking over the following:
Documentation and examples
Step-by-step example of usage
SQLite vs MySQL vs PostgreSQL
Keep in mind that sqlite is a stripped-down version of mysql and has a lot of features missing. For example, while altering an table you may only rename or add new columns, but you may not delete the existing columns. Have a look at the documentation for more specific details that may apply to your specific implementation.
You may find all the limitations here: Sqlite limitations

Migrate data from oracle to mysql [duplicate]

This question already has answers here:
Migrate from Oracle to MySQL
(7 answers)
Closed 8 years ago.
We are doing data migration from oracle to mysql using etl tool where source and target are in different hosts.
During fail over of the source we are set to do data migration with dump export/import.
Is there any way to import oracle dump directly into MYSQL without third party tools?
If its possible please explain a feasible soultion
Oracle import/export is designed to move databases/data between Oracle databases ideally of the same version, so no - this isn't an appropriate solution. Depending on the size and complexity of your database you could do it with scripts - sqldeveloper/modeller (free oracle tools) should help with this if you don't know how to do it yourself. I think sqlmodeller may allow you to generate a schema for another database (you can do it for sqlserver). The main thing to overcome is syntax differences between oracle and mysql as well as differences in datatypes - if you have been consistent in your oracle db design it should be fairly easy to overcome these with find/replace
http://www.oracle.com/technetwork/developer-tools/datamodeler/overview/index.html?ssSourceSiteId=otnru

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.