-1

What is the difference between database schema and database structure?

Is Schema = Structure + Data?

or

Is Schema just a set of metadata used by the database?

I'm talking in general terms, not specific to any database server.

I was trying to name backup files with contains data with backup_schema_transactional_mysql.sql and backup_schema_keystore_cassandra.sql.

2

Schema can be called as collection of objects but it is interoperated at different diversity in major platforms such as below:

SQL Server: Schema is collection of objects referring to unique name within one database, one database can have multiple distinct schemas within and each schema can contain DB objects such as tables, view, procedures, functions etc.

Oracle: In Oracle, every user is referred to as schema and there can be multiple schemas under one DB and then same as in SQL Server, each schema can contain DB objects such as tables, view, procedures, functions etc.

MySQL: In MySQL schema and database are used interchangeably, schema is referred as database. You cannot introduce any schema within one database as in SQL Server or Oracle.


The summary is in databases schema is a collection of DB objects but it's behavior changes according to platform on which you are using it.

  • Thanks for the answer, Don't know why ppl downvoted this question. – Mangesh Sathe Mar 25 at 14:56
0

A schema is a division of a database in namend parts. Its like folder division of a filesystem. A database structure is about the table structure of the database.

0

Schema: Is separate entity within the database. It is created by using the CREATE SCHEMA statement. A schema can be owned by a user, a role, or a group.

Structure: is necessary to ensure that the database components can show meaningful data.

Data: distinct pieces of information, formatted in a special way.

Schema is container for the structure, and structure is container for the data.

Table/view is part of the structure.

Not the answer you're looking for? Browse other questions tagged or ask your own question.