Big Chemical Encyclopedia

Chemical substances, components, reactions, process design ...

Articles Figures Tables About

Databases, Schemas, Tables, Rows, and Columns

A database can be thought of as a collection of schemas. It is possible to have many databases managed by one RDBMS, but each database is independent of any other. SQL was not designed to facilitate access to data in different databases. Recently, methods such as dbSwitch1 or dblink2 have made it possible to link together different databases. However, these are not considered here because they do not conform to the SQL standard and are implemented is various ways in different RDBMS. In the examples in this book, all schemas, table, functions, etc., are contained within one database. [Pg.22]

To create a schema named achemcompany, use the following SQL command  [Pg.22]

To create a table using SQL, the name of the table is required along with the names and data types of the columns making up the table. Consider the following SQL command  [Pg.22]

Create Table achemcompany.structure ( smiles Text, id Integer, mw Numeric(6,2), added Timestamp(0))  [Pg.22]

This creates a table of four columns in the schema achemcompany. The column named smiles is intended to store the SMILES representation of a chemical structure, the id column will store an integer identifier to be used for joining other tables, the column mw will store the molecular weight with a precision of 2 digits to the right of the decimal point, and the column named added will record when this structure was entered into the table. As defined above, any character string could be entered into the smiles column, any integer into the id column, and any valid [Pg.22]




SEARCH



Database schema

Rowing

Rows and Columns

Schema

Schema table

Tables, Rows, and Columns

© 2024 chempedia.info