Базы данных
Распределённые базы данных
Students(SId, GId, FirstName, LastName, PassSeries, PassNo, PassIssued, Photo)
StudentDatum(SId, GId, FirstName, LastName)
StudentPasses(SId, Series, No, Issued)
StudentPhotos(SId, Photo)
create view Students as StudentDatum natural join StudentPasses natural join StudenPhotos
Points(SId, CId, Points, Date)
create table Points (...) partition by range(Date) ( partition pHist values less than '2023-02-01', partition p2023s1 values less than '2023-07-01', partition p2023s2 values less than '2024-02-01', partition pFuture values less than maxvalue );
create table Points (...) partition by list(Term) ( partition pHist values in ('t2022-1', 't2022-2', ...), partition p2023s1 values in ('t2023-1'), partition p2023s2 values in ('t2023-2'), partition pFuture values in ('t2024-1') )
insert into Points (Term) values ('t2001-1');
create table Points (...) partition by hash(Term) partitions 4;
create table Points (...) partition by year(Date) ( partition pHist values less than 2023, partition pCurrent values less than 2024, partition pFuture values less than maxvalue )
create table Points (...) partition by year(Date) subpartition by hash(Term) ( partition History values less than 2023 ( subpartition History1, subpartition History2 ), partition Current values less than 2024 ( subpartition Current1, subpartition Current2 ) )
alter table таблица drop partition секция;
alter table таблица reorganize секция into (...);
alter table таблица add partition число;
alter table таблица coalesce partition число;
select * from Points where Date = '2023-12-18'