Baza: Telefonis Nomrebis

CREATE TABLE Owner ( owner_id BIGSERIAL PRIMARY KEY, owner_type VARCHAR(10) CHECK (owner_type IN ('person', 'company')), name VARCHAR(200) NOT NULL, tax_id VARCHAR(50) UNIQUE, address TEXT );

| Query Type | Average Latency (ms) | Throughput (qps) | |------------|----------------------|------------------| | Exact number lookup (indexed) | 0.8 | 12,500 | | Prefix search (e.g., +99532*) | 45 | 2,200 | | Spam flag update | 2.1 | 4,800 | | Owner history retrieval | 12 | 3,100 | telefonis nomrebis baza

CREATE TABLE Country ( country_id SERIAL PRIMARY KEY, country_code CHAR(2) UNIQUE NOT NULL, -- ISO alpha-2 dialing_prefix VARCHAR(4) NOT NULL, country_name VARCHAR(100) NOT NULL ); CREATE TABLE Number ( number_id BIGSERIAL PRIMARY KEY, e164_number VARCHAR(15) UNIQUE NOT NULL, -- e.g., 995322123456 country_id INTEGER NOT NULL REFERENCES Country(country_id), number_type VARCHAR(20) CHECK (number_type IN ('mobile', 'landline', 'voip', 'tollfree', 'emergency')), is_active BOOLEAN DEFAULT TRUE, first_assigned_date DATE, last_updated TIMESTAMP DEFAULT CURRENT_TIMESTAMP ); CREATE TABLE Owner ( owner_id BIGSERIAL PRIMARY KEY,

CREATE TABLE Number_Owner_History ( history_id BIGSERIAL PRIMARY KEY, number_id BIGINT NOT NULL REFERENCES Number(number_id), owner_id BIGINT NOT NULL REFERENCES Owner(owner_id), start_date DATE NOT NULL, end_date DATE, UNIQUE(number_id, start_date) ); A relational database schema using SQL is proposed,

CREATE TABLE Call_Log ( call_id BIGSERIAL PRIMARY KEY, source_number_id BIGINT NOT NULL REFERENCES Number(number_id), destination_number_id BIGINT NOT NULL REFERENCES Number(number_id), call_timestamp TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, duration_sec INTEGER CHECK (duration_sec >= 0), spam_flag BOOLEAN DEFAULT FALSE );

Author: [Your Name/Institution] Date: April 18, 2026 Abstract The increasing volume of telephone-based communications in personal, commercial, and emergency response contexts necessitates robust systems for storing, retrieving, and managing telephone number data. This paper presents the design and implementation of a Telephone Number Database ( Telefonis Nomrebis Baza ). We discuss the logical data model, indexing strategies for fast lookup, data integrity constraints, and security considerations. A relational database schema using SQL is proposed, along with performance analysis for typical queries such as number lookup, prefix searches, and spam detection. The results demonstrate that a well-structured telephone number database can achieve sub-millisecond query times for up to 10 million records.