Skip to content Skip to sidebar Skip to footer

If I Want To Build A Custom Database, How Could I?

I built a previous program that took client info and stored it in a folder of txt files (impractical much) but now I want to upgrade the program to be more efficient and put the in

Solution 1:

The free and portable Python shelve module in the standard library is probably all you need. It allows you to create and use what are essentially persistent dictionaries, so there's a very gradual learning curve. Converting your text files into one should be fairly easy, although won't be automatic -- you'll probably need to write a simple script to do it.

Solution 2:

Well, you could read your txt* files using the csv module in Python.

I'm afraid that knowledge of SQL is a must for any sort of database manipulations, unless you have the comfort of an ORM eg. Django's ORM.

*they aren't called that on anything but Windows.

Solution 3:

I would just get list of all *.txt files is directory using os.listdir() then read and parse all of them and finally put all information in some "database". Python has few such "database" kind of modules

Solution 4:

In addition to the suggestions above, take a look at Elixir, which is an abstraction layer over SQLAlchemy that makes building database interfaces (and inserting / querying information) rather simple.

Solution 5:

The main reason for DB to have a SQL is to make it separate and generic from the application that you are developing.

To have your own DB built you need to have a storage mechanism could be files on the hard disk, with search options so that you can access data immediately with keywords that you are interested in. on top of this you have to have a layer that initiates queues, reads them and translates to the lower file read and write functions. you need to have this queue layer because lets say you have 100 applications and all are trying to read and write from the same file at the same time and you can imagine what can happen to the file . there will be access denied , somebody using it, data corrupted etc etc.. so you need to put all these in queue and let this queue layer translate things for you.

to start with start from different ways of reading/writing/sorting of data into the file, and a queue layer. From there you can build applications.

The queue layer here is similar to the client that is trying to push the data into the communication port in most of the available databases.

Post a Comment for "If I Want To Build A Custom Database, How Could I?"