User

Watchlist-के-लिए-कौन-सा-System-Genuinely-Use-करें? 1 of 2 1 Meri-Nayi-SQLite (Dashboard-में-Already-है, Robust) 2 Existing-CSV (portfolio_utils.py, पहले-से-App-में-है) 3 दोनों-Merge-करें (CSV-को-SQLite-में-Migrate-करें) Something else

Asked by CNI Follower · 2 hrs ago · 14-09-2026

Best option: #3 – CSV → SQLite migrate karke sirf SQLite ko single source of truth banao.

Reasoning short and clear:

1. Sirf SQLite (Naya System)

- Pros:

- Robust, transactional (ACID) – partial writes, corruption ka risk kam.

- Indexes, fast queries, filters/sorts (sector, tags, alerts, etc.) easily.

- Schema evolve karna easy (new columns, new tables).

- Already dashboard mein integrated hai – duplication kam.

- Cons:

- Migration effort lagega (one-time), thoda code refactor karna padega.

2. Sirf Existing CSV

- Pros:

- Simple, human-readable, Excel/Sheets mein khul jata hai.

- App mein pehle se integrated (portfolio_utils.py).

- Cons:

- Concurrency issues (multi-process / multi-thread writes risky).

- Data integrity ensure karna mushkil (types, nulls, constraints).

- Large watchlist/portfolio pe performance degrade hogi.

- Schema change (naya column) = har jagah CSV handling change.

3. Dono parallel rakhna (Without migration)

- Ye sabse worst:

- Data duplication, sync problems (“true” data kidhar hai?).

- Edge cases: ek jagah add, doosri jagah missing.

- Maintenance overhead double.

4. Recommended architecture (Practical choice)

- Step 1: One-time migration script likho:

- `csv` se read → `sqlite3` / ORM (SQLAlchemy etc.) se insert.

- Step 2: portfolio_utils.py ko refactor karke SQLite read/write karao.

- Step 3: CSV ko sirf:

- Backup/export ke liye use karo (periodic export from SQLite).

- Optional manual import (new users ke liye, ya external data ke liye).

Isse:

- App mein single source of truth = SQLite.

- Robustness + performance + clean architecture milta hai.

- CSV ka convenience bhi export/import level pe mil jata hai, but core system DB-based rehta hai.

Conclusion:

Genuinely production-grade solution ke liye “3 – CSV ko SQLite mein migrate karo, aur baad mein sirf SQLite ko main system rakho; CSV only as export/backup” use karo.

If you have any further queries, please connect with us on 022-6290-10141 (Timings : 09.00 AM to 05.00 PM) or you can email us on info@cniinfoxchange.com