Learning MySQL: where to get test DB - mysql

I'm going to teach several persons mysql. I have the plan of that "course" the problem is that I do not have test DB to work in. A copy of any db from a large application will be hard to start with. IMHO something of 5-6 tables will be ok. Maybe someone knows where is it possible to get such a DB? And another question is: can someone give a link to a list of tasks on stored procedures?
Thank you in advance!

Here are some test databases to work with
https://dev.mysql.com/doc/index-other.html

Related

Do I need to create DB migration, if I have a designed DB in MySQL?

I designed a database in MYSQL. Now I want to connect that with my Laravel application. But after researching, I understand that I need to migrate the database into Laravel by creating migration tables. But doing the same thing that I did in MySQL is tedious. I think there is another way to do the stuff. After searching I got this article from stackoverflow, but this is related to yii framework. I think someone knows here the solution of my problem.
I don't see a problem here, you can just connect Laravel to your DB (by editing your .env file) without any problems, migration files are just an easier way to design and implement your tables (also altering your tables' scheme on production is a very useful usage for migrations), but with that being done then no further actions are required, and you are good to go!
it's pretty obvious, you can update the database setting in the .env file and use DB::table('your_table_name') and get whatever query you want.
The upside of using migrations is that the exact same database can be created on different systems (ex: co-workers or acceptance/production servers).
Laravel migrations have an up and a down function so you can rollback to a specific version if something went wrong, very usefull when publishing your code.
That being said, co-workers could also review the database changes and for example hint at using more indexes and foreign keys.
As the other comments said, it's not a requirement you use migrations but it has considerable advantages versus creating and updating the database manually.

MySql Structure Check and Suggestion

Please forgive me if this is not the correct place for this question.
A while back while working on a Mysql database I come across something that did a check on the database and the database structure and provided a sort of report that gave suggestions on what types/lengths/values to be used based on the data in the database.
I have been searching for this and just cant seem to find it again, has any come across anything like this or know where I can find this again.
Currently using phpmyadmin and also had a look on Navicat

DataModelling or ER model building software for MacBook and MYSQL

Hi Friends I have been looking for to build a ER Diagram for my database in Macbook.
Please help me finding a right tool for the same.
I have tried MYSQL Work bench but i need it to be updated dynamically if the DB gets changed.
Also have tried some online stuffs like gliffy.com but of no use.
Please help me I am new to Databases so quick help will be appreciated.
You won't get automatic updates (I understand automatic updates as something that happens in the background without any action from you).
MySQL Workbench however has a two-way sync that you can use to update your models at the same time you update your schema (from the model). You can select to do only one direction, but you have to trigger synchronization yourself.
SchemaCrawler is a free tool that generates diagrams from a database. It is driven from the commandline. You can generate a new diagram quickly, when your database changes, by re-running your command. Here is an example diagram:
Sualeh Fatehi, SchemaCrawler

Synchronize 2 database in django

I have 2 different server running django in it. (using postgre)
Both has the same user table.
I wanted to synchronize the user table, as if I update or delete user in one server then the 2 db should also get updated.
I guess replication is not a solution for my case.
Can anyone point me in right directions. or any link or reference will be helpful.
Both server are running different django code.
Thanks,
I don't know how to do this in PostgreSQL, but in MySQL you could create database VIEW pointing to a table in another database. This way you could reuse the existing auth_user table in the other sever.
I would take a look at pgpool-II. I haven't used it myself, but it's been recommended to me for similar purposes and after a bit of research I came to the conclusion that it's one of the better projects out there.

A Database Tool to check changes happened overnight and upload to MasterDB

HI
I have 5 different database and a Master DB with same Schema .I am looking for a tool which can check any changes( new row insertion ) has happened since my last update and Sync with my Master DB . Is there any tool available for this
Sounds like a good case for using merge replication.
Don't know about free tools - but I know of the redgate's data compare which will do this job for you. It's automatable. Having used it for this task I'd strongly recommend it.
As a personal solution, since you're using SQL Server you could iterate the tables (sys.tables), and do an join between DBs and see what needs to be inserted/deleted etc. Sounds like a tedious job though if you reuse Keys. If the keys are not reused then the task is quite simple.