Quickstart Guide
Get up and running with AVA Database in under 5 minutes.
Installation
Prerequisites
- Linux (Ubuntu 20.04+ or CentOS 7+) or macOS
- Python 3.7+ or R 3.6+ (for API bindings)
- 4GB RAM minimum (8GB+ recommended)
- Valid AVA license (trial or commercial)
Step 1: Download AVA
Download the latest release from our website or use the installer script:
# Download installer
curl -O https://download.avainformatics.com/ava-install.sh
# Make executable
chmod +x ava-install.sh
# Run installer
./ava-install.sh
Step 2: Install Python API (Optional)
# Install via pip
pip install avapy
# Or build from source
cd api/python
python setup.py install
Step 3: Set Up License
Place your license file in one of these locations:
# Option 1: Current directory
cp ava.license ./
# Option 2: Home directory
cp ava.license ~/ava.license
# Option 3: System-wide
sudo cp ava.license /etc/ava/ava.license
# Option 4: Environment variable
export AVA_LICENSE_FILE=/path/to/ava.license
Download Sample Data
Get started quickly with our sample stock prices dataset. This CSV file contains historical stock price data with TICKER, DATE, and PRICE columns.
prices.csv
Sample stock price data for testing and learning
Dataset Information
- Format: CSV (comma-separated values)
- Columns: TICKER (string), DATE (date), PRICE (double)
- Size: ~12 MB
- Use case: Perfect for following along with all SQL examples in this documentation
Your First Query
Download the sample data above, then load it and run a query using the Python API:
import avapy
# Load the sample CSV file
avapy.LoadTable("prices.csv", "prices")
# Run a SQL query - get top 10 stocks by average price
result = avapy.asql("""
SELECT TICKER,
COUNT(*) as num_records,
AVG(PRICE) as avg_price,
MIN(PRICE) as min_price,
MAX(PRICE) as max_price
FROM prices
GROUP BY TICKER
ORDER BY avg_price DESC
LIMIT 10
""")
print("Top 10 Stocks by Average Price")
print(result)
Success!
You've just run your first AVA query! The results show stock tickers with their record counts, average prices, and price ranges - all computed in milliseconds.
Common Operations
Loading Data
# From CSV
avapy.LoadTable("data.csv", "my_table")
# From multiple files
for file in ["jan.csv", "feb.csv", "mar.csv"]:
avapy.LoadTable(file, "sales")
# View table structure
avapy.asql("DESCRIBE my_table")
Querying Data
# Basic SELECT
avapy.asql("SELECT * FROM sales WHERE revenue > 1000")
# Aggregations
avapy.asql("""
SELECT region,
COUNT(*) as num_sales,
SUM(revenue) as total_revenue,
AVG(revenue) as avg_revenue
FROM sales
GROUP BY region
""")
# Joins
avapy.asql("""
SELECT s.*, c.customer_name, c.segment
FROM sales s
JOIN customers c ON s.customer_id = c.id
""")
Running Regression
# Create regression model
avapy.asql("""
CREATE REGRESSION MODEL price_model
AS SELECT sqft, bedrooms, bathrooms, age
FROM housing_data
PREDICT price
""")
# Make predictions
predictions = avapy.asql("""
SELECT *,
PREDICT(price_model) as predicted_price
FROM new_listings
""")