|
|
| (17 intermediate revisions by the same user not shown) |
| Line 1: |
Line 1: |
| − | ==Terminology of relational model==
| + | ~ Migrated |
| − | A database is an organized collection of data. It is the collection of schemas, tables, queries, reports, views, and other objects. https://en.wikipedia.org/wiki/Database
| |
| − | | |
| − | | |
| − | * What is the primary key: '''title_id'''
| |
| − | * What is the foreign key: '''Pub_id'''
| |
| − | * What is the cardinality: '''13'''
| |
| − | : <span style="color:#FFFFFF; background:#000000"> select count(title_id) as 'Cardinality of the «titles» table' from titles; </span>
| |
| − | * What is its degree: '''9'''
| |
| − | * What is the domain of contract: '''Smallint(6) NOT NULL'''
| |
| − | | |
| − | * What is the domain of ''country'' in the table ''Publishers'': '''varchar(15) NOT NULL'''
| |
| − | | |
| − | | |
| − | | |
| − | ==[[MySQL]]==
| |
| − | | |
| − | | |
| − | <br />
| |