- •Create the database with the following tables:
- •Create the database with the following tables:
- •Create the database with the following tables:
- •Create the database with the following tables:
- •Create the database with the following tables:
- •Create the database with the following tables:
- •Create the database with the following tables:
- •Create the database with the following tables:
- •Create the database with the following tables:
- •Create the database with the following tables:
- •Create the database with the following tables:
- •Card 19
- •Create the database with the following tables:
- •Create the database with the following tables:
- •Create the database with the following tables:
- •Create the database with the following tables:
- •Create the database with the following tables:
- •Create the database with the following tables:
- •Create the database with the following tables:
- •Create the database with the following tables:
- •Create the database with the following tables:
- •Create the database with the following tables:
- •Create the database with the following tables:
- •Create the database with the following tables:
-
Relational algebra.Set-theoretic operations. Example
-
SQL language. Syntectical forms of integrity constraints definition. Example
-
By using database from labs write expression in Relational agebra and Tuple relational calculus that answer to the following query: Output department names of the Computer Science faculty whose groups of the first course study mathimatics discipline.
-
Create the database with the following tables:
Database of agregate/parts:
AGREGATE – agregate, ASSEMBLY – agregare assembly, PART – aggregate/assembly part.
|
Table name |
Column name |
Data type |
Length (precis.) |
Scale |
Column integrity constraint |
|
AGREGATE |
AGNo |
NUMBER |
3 |
|
PRIMARY KEY |
|
Ag_Name |
VARCHAR2 |
25 |
|
Cannot be NULL |
|
|
AG_Weight |
NUMBER |
3 |
3 |
Cannot be NULL |
|
|
AG_Type |
CHAR |
1 |
|
Cannot be NULL. Take values from the list (‘1‘,‘2‘,‘3‘,‘4‘,‘5‘) |
|
|
Table integrity constraint |
Pair of columns (Ag_Name, AG_Type) is unique - UNIQUE |
||||
|
ASSEMBLY |
ASNo |
NUMBER |
3 |
|
PRIMARY KEY |
|
As_Name |
VARCHAR2 |
30 |
|
Cannot be NULL |
|
|
AS_Color |
NUMBER |
3 |
|
Cannot be NULL. Cannot be less than 0 |
|
|
AG_No |
NUMBER |
3 |
|
FOREIGN KEY, references to the column AGNo of the table AGREGATE. If aggregate is delete then all its child assemples are deleted too |
|
|
RASNO |
NUMBER |
3 |
|
FOREIGN KEY, references to the column ASNo of the table ASSEMBLY. It is not possible to delete assembly if there exists at least one child assembly |
|
|
Table integrity constraint |
|
||||
|
PART |
|
|
|
|
|
|
Part_Name |
VARCHAR2 |
30 |
|
Cannot be NULL |
|
|
Part_Price |
NUMBER |
4 |
2 |
Cannot be NULL. Cannot be less than 0 |
|
|
Part_ discount |
NUMBER |
4 |
2 |
Cannot be less than 0 |
|
|
AGNo |
NUMBER |
3 |
|
FOREIGN KEY, references to the column AGNo of the table AGREGATE. If aggregate is delete then all its child parts are deleted too |
|
|
ASNo |
NUMBER |
3 |
|
FOREIGN KEY, references to the column ASNo of the table ASSEMBLY. If aggregate is deleted then all references to it are set to NULL |
|
|
Table integrity constraint |
Pair of columns (Com_Name, SM_BARNo) is a primary key Value of the column Part_ discount must be less than 1/3 value of the column Part_Price |
||||
Card 26
