- •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:
-
Network data structure operations
-
SQL language. UNIQUE integrity constraint. Syntax and semantics. Examples.
-
By using database from labs write expression in Relational agebra and Tuple relational calculus that answer to the following query: “Ouptut teacher names and posts of the CS faculty that have lessons of the type ‘lab’ in the groups of the 4th course in the second week
-
Create the database with the following tables:
Database of the family tree:
PERSON – info about persons and their parents
|
Table name |
Column name |
Data type |
Length (precis.) |
Scale |
Column integrity constraint |
|
PERSON |
Name |
VARCHAR2 |
25 |
|
Cannot be NULL |
|
TaxID |
NUMBER |
8 |
|
UNIQUE, cannot be NULL, default value – 0 is in interval 127-33355 |
|
|
Sex |
CHAR |
1 |
|
List of possible values – (‘M’, ’F’) |
|
|
BirthDate |
Date |
|
|
Is in interval 01.01.1930 – 12.12.2012 |
|
|
HireDate |
Date |
|
|
Is more than 10.11.2000 |
|
|
Pas_Ser |
CHAR |
2 |
|
Default value‘НН’ |
|
|
Pas_Nom |
CHAR |
6 |
|
Default value ‘ХХХХХХ’ |
|
|
M_Pas_Ser |
CHAR |
2 |
|
|
|
|
M_Pas_Nom |
CHAR |
6 |
|
|
|
|
F_Pas_Ser |
CHAR |
2 |
|
|
|
|
F_Pas_Nom |
CHAR |
6 |
|
|
|
|
Table integrity constraint |
Pair of columns (Pas_Ser, Pas_Nom) is a PRIMARY KEY Tripleof columns (Name, BirthDate, Sex) is unique – UNIQUE Pair of columns (M_Pas_Ser, M_Pas_Nom) is a FOREIGN KEY. It references to the pair of columns (Pas_Ser, Pas_Nom) of the same table (it references the the mother of the person). Pair of columns (F_Pas_Ser, F_Pas_Nom) is a FOREIGN KEY. It references to the pair of columns (Pas_Ser, Pas_Nom) of the same table (it references the the father of the person). When person is deleted then all references to it as a mother/father are set to NULL. HireDate must be more than BirthDate at least 10000 days |
||||
Card 12
-
Relational algebra set theoretic operations
-
SQL language. Rules od database object naming
-
By using database from labs write expression in Relational agebra and Tuple relational calculus that answer to the following query: “Output teacher names and salaries of CS faculte that have lectures in rooms of the building 6 on Monday of the 2nd week
-
Create the database with the following tables:
Database of the flight routs:
COMPANY – aircraft company, AIRPORT– airport of arrival/departure, FLIGHT – flight routs
|
Table name |
Column name |
Data type |
Length (precis.) |
Scale |
Column integrity constraint |
|
COMPANY |
CID |
NUMBER |
3 |
|
PRIMARY KEY |
|
Name |
varchar2 |
50 |
|
UNIQUE, cannot be NULL |
|
|
COUNTRY |
varchar2 |
30 |
|
Cannot be NULL |
|
|
NumOfPlanes |
NUMBER |
3 |
|
values are in the interval 1 - 200 |
|
|
|
FoundDate |
Date |
|
|
Is in interval 1.12.1950 – 1.1.2010 |
|
|
RegDate |
Date |
|
|
Is more than 13.12.2011 |
|
Table integrity constraint |
Pair of columns (Name, Country) is unique Triple of columns (NumOfPlanes, FounDate, RegDate ) is unique RegDate must be more FoundDate no more than 20 days |
||||
|
AIRPORT |
APID |
NUMBER |
3 |
|
PRIMARY KEY |
|
Name |
varchar2 |
50 |
|
Cannot be NULL |
|
|
COUNTRY |
varchar2 |
30 |
|
Cannot be NULL |
|
|
Zone |
number |
7 |
2 |
cannot be negative |
|
|
Table integrity constraint |
Triple of columns (NAME, COUNTRY, Zone) is unique |
||||
|
FLIGHT |
CompID |
NUMBER |
3 |
|
FOREIGN KEY, references to the column CID of the table COMPANY. If the company is deleted then all its flights are deleted too. |
|
AirToID |
NUMBER |
3 |
|
FOREIGN KEY, references to the column APID of the table AIRPORT. If the airport is deleted then all foreign keys references to the deleted primary key are set to NULL. |
|
|
AirFromID |
NUMBER |
3 |
|
FOREIGN KEY, references to the column APID of the table AIRPORT. If the airport is deleted then all foreign keys references to the deleted primary key are set to NULL. |
|
|
FlightDate |
Date |
|
|
Cannot be less than 01.01.2000, cannot be NULL |
|
|
Table integrity constraint |
Triple of columns (CompID, AirToID, FlightDate) is a PRIMARY KEY |
||||
Card 13
-
Relational data structure
-
SQL language.Purpose and possibilities of INSERT statement. Examples
-
By using database from labs write expression in Relational agebra and Tuple relational calculus that answer to the following query “Outputs teacher names and posts of the CS faculty that have lectures of the type ‘lab’ in the subject DBMS in room 200 of the 6th building”
