wad-team 9

Upload: cristian-badita

Post on 04-Jun-2018

222 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/14/2019 WAD-Team 9

    1/13

    1 st PresentationTravel Agency

    6st November 2013

  • 8/14/2019 WAD-Team 9

    2/13

    The Project DatabaseThe project consists of an application for a tourismagency. The first part of it is building the database, which will store data about the stayings, destinationsand users.The following function will be implemented:Registration of the user and adding it to the database

    User authentication which will be able to modify thedata Adding/modifying of a staying for a user

  • 8/14/2019 WAD-Team 9

    3/13

    A user can log in, the database will be updated aftereach new registration A user can log in, having the possibility of modifyinghis own profile after authentication A user can visualize trips, search, evaluate and buy

    The staying will be added to the basket, and additionalinformation will be required in order to finish thesessionThe user can evaluate trips by giving votes, gradesFor each staying, the user can subscribe withimpressions, opinions, suggestions

  • 8/14/2019 WAD-Team 9

    4/13

    The user can modify the database only after he has

    logged in (e.g. making a reservation for a staying). When a reservation is made, it is inserted in thedatabase in the Rezervare table, but at the same timethe Sejur table is opened, and a suitable Staying is

    looked up. If this staying exists, therefore the numberof available places is larger than the number of thedesired reservation number to be made, then thereservation will be made, and the table Sejur will be

    updated with the number of available places left.

  • 8/14/2019 WAD-Team 9

    5/13

  • 8/14/2019 WAD-Team 9

    6/13

    The Database was created as it follows:

    Utilizator Tablecreate table Utilizator (

    CNP varchar(13) primary key,numeUtilizator varchar(100) not null,

    parola varchar(100) not null,email varchar(100),educatie varchar(100),varsta int, profesie varchar(100),unique(numeUtilizator)

    );

  • 8/14/2019 WAD-Team 9

    7/13

    After inputing the required data, the user can receivesuggestions related to the staying he can choose,according to its occupation, studies, age.The next table contains information about the stayings

    offer. This contains the destination, departure date,duration of the staying, price, hotel, arriving date. Therecan be also introduced pictures with the location,landscape, hotel.

  • 8/14/2019 WAD-Team 9

    8/13

    Sejur Tablecreate table Sejur (

    idSejur int primary key auto_increment,destinatie varchar(100),traseu varchar(200),hotel varchar(100),

    dataPlecare datetime,durata int, pret int,nrLocuri int,nota double,dataIntroducere datetime,urlPoza varchar(100),

    );

  • 8/14/2019 WAD-Team 9

    9/13

    Utilizator_Sejur Table

    create table Utilizator_Sejur(CNP varchar(13),idSejur int not null,vot int,constraint Utilizator_Sejur_PK primary key

    (CNP,idSejur),constraint legaturaUtilizator_SejurUtilizator

    foreign key(CNP) references Utilizator(CNP) on deletecascade,

    constraint legaturaSejurUtilizator_Sejur foreign key(idSejur) references Sejur(idSejur) on deletecascade );

  • 8/14/2019 WAD-Team 9

    10/13

    Tag Table create table Tag (caracteristica varchar(50) primary key,descriere varchar(200)

    );

  • 8/14/2019 WAD-Team 9

    11/13

    Caracteristici Tablecreate table Caracteristici (

    CNP varchar(13),idSejur int not null,caracteristica varchar(50),nota int,constraint Caracteristici_PK primary key

    (CNP,idSejur,caracteristica),constraint legaturaCaracteristiciUtilizator

    foreign key(CNP) references Utilizator(CNP) on delete cascade,constraint legaturaSejurCaracteristici foreign

    key(idSejur) references Sejur(idSejur) on delete cascade,constraint legaturaTagCaracteristici foreign

    key(caracteristica) references Tag(caracteristica) on deletecascade );

  • 8/14/2019 WAD-Team 9

    12/13

    Rezervare Table create table Rezervare (

    idRezervare int primary key auto_increment,CNP varchar(13),idExcursie int,nrLocuri int, pret int,data datetime,anulat bool,constraint legaturaRezervareUtilizator foreign

    key(CNP) references Utilizator(CNP) on delete cascade,constraint legaturaSejurUtilizator foreign

    key(idSejur) references Sejur(idSejur) on delete cascade );

  • 8/14/2019 WAD-Team 9

    13/13

    Anulare Table create table Anulare (

    idAnulare int primary key auto_increment,

    idRezervare int not null,data datetime,constraint legaturaAnulareRezervare foreign

    key(idRezervare) references Rezervare(idRezervare) on

    delete cascade );