File: testdb_create.sql

package info (click to toggle)
openldap2.3 2.3.30-5%2Betch3
  • links: PTS
  • area: main
  • in suites: etch
  • size: 18,316 kB
  • ctags: 15,854
  • sloc: ansic: 210,071; sh: 28,305; cpp: 4,231; sql: 1,661; makefile: 1,515; perl: 870
file content (47 lines) | stat: -rw-r--r-- 967 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
drop table persons;
drop sequence persons_id_seq;
create table persons (
	id serial not null primary key,
	name varchar(255) not null,
	surname varchar(255) not null,
	password varchar(64)
);

drop table institutes;
drop sequence institutes_id_seq;
create table institutes (
	id serial not null primary key,
	name varchar(255)
);

drop table documents;
drop sequence documents_id_seq;
create table documents (
	id serial not null primary key,
	title varchar(255) not null,
	abstract varchar(255)
);

drop table authors_docs;
create table authors_docs (
	pers_id int not null,
	doc_id int not null,
	primary key ( pers_id, doc_id )
);

drop table phones;
drop sequence phones_id_seq;
create table phones (
	id serial not null primary key,
	phone varchar(255) not null ,
	pers_id int not null
);

drop table referrals;
drop sequence referrals_id_seq;
create table referrals (
	id serial not null primary key,
	name varchar(255) not null,
	url varchar(255) not null
);