/[H6]/docs/pgsql.txt
ViewVC logotype

Annotation of /docs/pgsql.txt

Parent Directory Parent Directory | Revision Log Revision Log


Revision 54 - (hide annotations) (download)
Tue Sep 12 09:09:30 2006 UTC (17 years, 8 months ago) by torben
File MIME type: text/plain
File size: 1647 byte(s)
In the Search() function in the databaselayers we shouldn't waste time and space on finding
the previous checkouts and the current reservations - this should be done in getEquipment().

ResultDialog and ResultDetailsDialog now communicates throuh a CString barcode, insted of an index into the search result.

On an administrative action the ResultDetailsDialog now refreshes the data instead of closing the dialog.
1 torben 44 -- Backup til genopbygning af databasen:
2     -- PostgreSQL
3    
4     -- Create the database and tables
5     create database h6projekt;
6     use h6projekt;
7    
8     create table Person (
9     PersonID serial primary key,
10     Initialer varchar(4) NOT NULL,
11     Navn varchar(50) NOT NULL,
12     Pass varchar(32),
13     Admin int
14     );
15    
16     create table Udstyr (
17     Stregkode bigint primary key NOT NULL,
18     Navn varchar(20) NOT NULL,
19     Beskrivelse varchar(200),
20     Placering varchar(20) NOT NULL,
21     Status int NOT NULL
22     );
23    
24     create table Udlån (
25     Udlånid serial primary key,
26     Personid int NOT NULL,
27     Stregkode bigint NOT NULL,
28 torben 46 Startdato timestamp NOT NULL,
29     Afleveringsdato timestamp,
30 torben 44 Antaldage int NOT NULL
31     );
32    
33     create table Resevation (
34     resevationid serial primary key,
35     Personid int NOT NULL,
36     Stregkode bigint NOT NULL,
37 torben 46 Startdato timestamp NOT NULL
38 torben 44 );
39    
40     create table Status (
41     Statusid int primary key,
42     Beskrivelse varchar(40) NOT NULL
43     );
44    
45     -- -----------------------------------------------
46     -- Basic data
47     INSERT INTO Person (Initialer,Navn,Pass,Admin)
48 torben 54 VALUES ('ADM', 'Systems administrator', 'Admin', 1);
49 torben 44
50     INSERT INTO Status (Statusid, Beskrivelse)
51     VALUES (1,'Udlånt');
52    
53     INSERT INTO Status (Statusid, Beskrivelse)
54     VALUES (2,'Reserveret');
55    
56     INSERT INTO Status (Statusid, Beskrivelse)
57     VALUES (3,'Ledig');
58    
59     -- -----------------------------------------------
60     -- Testdata
61    
62     insert into Person (Initialer, Navn)
63     values ('JFRE', 'Jytte Fredriksen');
64    
65 torben 54 insert into Udstyr (Stregkode, Navn, Beskrivelse, Placering,Status)
66     values (5709068802148, 'Projektor', 'VGA Projektor', 'LM01',3);
67 torben 44

  ViewVC Help
Powered by ViewVC 1.1.20