Here is some info to get you started with databases.
Others have pointed you to perl interfaces you can use after you setup your database.
CREATE and populate database (Assuming content above is saved as animal.sql:BEGIN TRANSACTION; CREATE TABLE `animal` ( `id` INTEGER UNIQUE, `type` TEXT, `name` TEXT, PRIMARY KEY(id) ); INSERT INTO `animal` VALUES (1,'cat','Felix'), (2,'cat','Sylvester'), (3,'cat','Garfield'), (4,'lion','Simba'), (5,'lion','Elsa'), (6,'tiger','Sher Khan'), (7,'tiger','Woods'), (8,'dog','Rover'); CREATE INDEX `by-type` ON `animal` (`type` ASC); COMMIT; CREATE VIEW Summary AS Select type, count(*) FROM animal GROUP by type; CREATE VIEW cats_only AS SELECT id,name FROM animal WHERE type='cat';
Query examples from the command line:$sqlite3 animal.sqlite '.read animal.sql'
$ sqlite3 -header -column animal.sqlite SQLite version 3.11.0 2016-02-15 17:29:24 Enter ".help" for usage hints. sqlite> select * from summary; type count(*) ---------- ---------- cat 3 dog 1 lion 2 tiger 2 sqlite> select * from cats_only; id name ---------- ---------- 1 Felix 2 Sylvester 3 Garfield sqlite> .q
P.S. I have pointed you toward a traditional "relational" database.
Followers of current technology are proponents of "nosql" databases, such as Elastic Search.
All power corrupts, but we need electricity.
In reply to Re: perl create database with folder system
by NetWallah
in thread perl create database with folder system
by darkblackblue
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |