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.

SCHEMA and data:
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';
CREATE and populate database (Assuming content above is saved as animal.sql:
$sqlite3 animal.sqlite '.read animal.sql'
Query examples from the command line:
$ 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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.