0% found this document useful (0 votes)
6 views

Steps For DB Installation

Uploaded by

Lochan Shruthi
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Steps For DB Installation

Uploaded by

Lochan Shruthi
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

Install PostgreSQL:

Download the PostgreSQL installer from the official website:


https://www.postgresql.org/download/windows/
Follow the installation wizard to install PostgreSQL on your system.

Configure PostgreSQL:

PostgreSQL creates a user with the same name as your operating system username. You
can change this by following the instructions provided during installation or by
using the createuser command.

Download pgAdmin:

Visit the pgAdmin download page: https://www.pgadmin.org/download/


Choose the appropriate version for your operating system (Windows, macOS, or
Linux).
Click on the download link to download the installer.

Install pgAdmin:

Double-click the downloaded installer to run it.


Follow the installation wizard instructions.
You can choose the installation directory and select components to install.
Complete the installation process.

Launch pgAdmin after installation.


When you open pgAdmin for the first time, you'll be prompted to set a master
password. This password will be used to encrypt sensitive information stored by
pgAdmin.
After setting the master password, pgAdmin will open, and you can start using it to
manage your PostgreSQL databases.

Connect pgAdmin to PostgreSQL:

In pgAdmin, click on the "Add New Server" button or navigate to the "Servers" menu
and select "Add Server".
Fill in the connection details for your PostgreSQL server, including the host,
port, username, password, and database.
Click "Save" to add the server to pgAdmin.
You should now be able to see your PostgreSQL server listed in pgAdmin's server
dashboard.

SQL script that you can use to create all the required tables for storing CVE
information in your PostgreSQL database:

CREATE TABLE cve (


id SERIAL PRIMARY KEY,
cve_id VARCHAR(255) UNIQUE,
description TEXT,
cvss_score FLOAT,
last_modified TIMESTAMP
);

CREATE TABLE cve_year (


id SERIAL PRIMARY KEY,
year INTEGER UNIQUE
);
This script creates two tables:

cve: This table stores information about CVEs. It includes columns for the CVE ID,
description, CVSS score, and last modified timestamp. The cve_id column is defined
as UNIQUE to ensure that each CVE ID is unique in the database.

cve_year: This table stores information about the years for which CVE data is
available. It includes a single column for the year, which is defined as UNIQUE to
prevent duplicate entries.

You might also like