I have to move a database from sql server to mySql, and our current db uses schemas as namespace.
So all of the FOO tables can be reference like FOO.TableFoo1, FOO.TAbleFoo2, FOO.TableF003, etc.
Can we do this with MySql? Will it work.
The mysql schema is the system schema. It contains tables that store information required by the MySQL server as it runs. A broad categorization is that the mysql schema contains data dictionary tables that store database object metadata, and system tables used for other operational purposes.
In practice, these namespaces are merely a prefix before a given ID that is applied every time a value is stored or retrieve from the cache. You can implement the same basic principle by using keys that describe the object and the unique identifier within the key that you supply when the object is stored.
The MySQL concept of a schema maps to the SQL Server concept of a database and one of its schemas. For example, MySQL might have a schema named HR. An instance of SQL Server might have a database named HR, and within that database are schemas. One schema is the dbo (or database owner) schema.
In MySQL, schema is synonymous with database. As the query is written to create the database, similarly the query can be written to create the schema. Logical structure can be used by the schema to store data while memory component can be used by the database to store data.
That is wrong Joachim. A database is not a schema. Try buying hosting where you only get 20 databases but you need 33. With a schema you can use only one database and have many tables with the same name but different schema.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With