create_database: Creating database

Description Usage Arguments Details Value Note Author(s) Examples

View source: R/create_database.R

Description

Function create_database creates a database with four empty tables: deputies, votings, votes, statements.

Usage

1
create_database(dbname, user, password, host)

Arguments

dbname

name of database

user

name of user

password

password of database

host

name of host

Details

 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
Created tables:
1. deputies with columns:
    1) id_deputy - deputy's id,
    2) nr_term_of_office - Polish Diet's number of term of office,
    3) surname_name - deputy's names and surnames,
2. votings with columns:
    1) id_voting - voting's id,
    2) nr_term_of_office - Polish Diet's number of term of office,
    3) nr_meeting - meeting's number,
    4) date_meeting - meeting's date,
    5) nr_voting - voting's number,
    6) topic_voting - voting's topic,
    7) link_results - link with voting's results,
3. votes with columns:
    1) id_vote - vote's id,
    2) nr_term_of_office - Polish Diet's number of term of office,
    3) id_deputy - deputy's id,
    4) id_voting - voting's id,
    5) vote - deputy's vote, one of: 'Za','Przeciw',
              'Wstrzymal sie','Nieobecny',
    6) club - deputy's club,
4. statements with columns:
    1) id_statement - statement's id, like: 
    (meeting's number).(voting's number).(statement's number),
    2) nr_term_of_office - Polish Diet's number of term of office,
    3) surname_name - author of statement,
    4) date_statement - statement's date,
    5) titles_order_points - title of order points,
    6) statement - content of statement.

Value

invisible NULL

Note

All information is stored in PostgreSQL database.

Author(s)

Piotr Smuda

Examples

1
2
3
## Not run: 
create_database(dbname, user, password, host)
## End(Not run)

sejmRP documentation built on May 2, 2019, 5:16 a.m.