Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'retrieved': 0.05; 'stuff.': 0.05; 'bytes.': 0.07; 'sqlite': 0.07; 'python': 0.08; 'bytes,': 0.09; 'correct.': 0.09; 'deletion': 0.09; 'matt': 0.09; 'relational': 0.09; 'reply-to:addr:comp.lang.python': 0.09; 'rewritten': 0.09; 'to:addr:comp.lang.python': 0.09; 'am,': 0.12; 'library': 0.13; 'stored': 0.13; 'entries': 0.15; '1024': 0.16; '2048': 0.16; '255': 0.16; 'beginning.': 0.16; 'csv)': 0.16; 'dbms': 0.16; 'idea:': 0.16; 'lengths': 0.16; 'mission:': 0.16; 'operator.': 0.16; 'row': 0.16; 'with?': 0.16; 'cc:addr:python- list': 0.16; 'wrote:': 0.18; 'bytes': 0.18; 'convert': 0.19; 'cc:no real name:2**0': 0.20; 'suggest': 0.20; 'trying': 0.21; 'header:In-Reply-To:1': 0.22; 'thus': 0.23; 'figure': 0.23; 'base.': 0.23; 'similar,': 0.23; 'sunday,': 0.23; 'string': 0.24; 'cc:2**0': 0.24; 'byte': 0.24; 'structure': 0.26; "i'm": 0.26; 'developing': 0.26; 'function': 0.27; 'all,': 0.28; 'url:mailman': 0.28; 'column': 0.28; 'bit': 0.28; '27,': 0.29; 'fixed': 0.29; 'cc:addr:python.org': 0.29; 'second': 0.29; 'nov': 0.29; '(maybe': 0.30; 'databases,': 0.30; 'hash': 0.30; 'sun,': 0.30; 'subject:?': 0.31; "i've": 0.31; "i'll": 0.31; 'sufficient': 0.32; 'me?': 0.32; 'url:listinfo': 0.32; 'idea': 0.32; 'sort': 0.33; 'header:User- Agent:1': 0.33; 'there': 0.33; 'from:addr:googlemail.com': 0.34; 'mostly': 0.34; 'too': 0.34; 'subject:project': 0.34; 'thus,': 0.34; 'thank': 0.35; 'record': 0.35; 'window': 0.35; 'url:python': 0.36; 'file': 0.36; 'question': 0.36; 'two': 0.37; 'but': 0.37; 'entry': 0.37; 'received:google.com': 0.37; 'think': 0.37; 'replace': 0.38; 'some': 0.38; 'several': 0.38; 'received:209.85': 0.38; 'first.': 0.39; 'url:org': 0.39; 'data,': 0.39; 'files': 0.39; 'called': 0.40; "it's": 0.40; 'received:209': 0.40; 'management': 0.60; 'more': 0.61; 'type': 0.61; 'according': 0.61; '2011': 0.61; 'types': 0.61; '1000': 0.62; 'saturday,': 0.64; 'simple,': 0.64; 'maximum': 0.66; 'p.s.': 0.67; '26,': 0.67; 'show': 0.67; 'limit': 0.67; 'header:Reply-To:1': 0.71; 'reply- to:no real name:2**0': 0.72; 'access,': 0.74; 'database.': 0.74; 'reply-to:addr:googlegroups.com': 0.74; 'subject:this': 0.74; '256': 0.84; 'joiner': 0.84; 'lightweight': 0.84; 'rusi': 0.84; 'movies': 0.96; 'sheet': 0.96 Newsgroups: comp.lang.python Date: Sun, 27 Nov 2011 00:49:14 -0800 (PST) In-Reply-To: <24389083.226.1322382592895.JavaMail.geo-discussion-forums@prij11> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=1.168.128.54; posting-account=5JdMBQoAAABHnS4mjpqEzxnmWtgiiVNw References: <4ec0f070$0$1378$4fafbaef@reader2.news.tin.it> <581dab49-e6b0-4fea-915c-4a41fa887c3b@p7g2000pre.googlegroups.com> <11840843.114.1322350898307.JavaMail.geo-discussion-forums@prfi36> <24389083.226.1322382592895.JavaMail.geo-discussion-forums@prij11> User-Agent: G2/1.0 X-Google-Web-Client: true MIME-Version: 1.0 Subject: Re: my new project, is this the right way? From: 88888 Dihedral To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: comp.lang.python@googlegroups.com List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Message-ID: Lines: 84 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1322383757 news.xs4all.nl 6974 [2001:888:2000:d::a6]:36051 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:16285 On Sunday, November 27, 2011 4:29:52 PM UTC+8, 88888 Dihedral wrote: > On Sunday, November 27, 2011 12:03:26 PM UTC+8, Matt Joiner wrote: > > Sounds like you want a key-value store. If it's a lot of data, you may > > still want a "database", I think it's just relational databases that > > you're trying to avoid? > >=20 > > On Sun, Nov 27, 2011 at 10:41 AM, 88888 Dihedral > > wrote: > > > On Saturday, November 26, 2011 1:01:34 AM UTC+8, rusi wrote: > > >> On Nov 14, 3:41=A0pm, Tracubik wrote: > > >> > Hi all, > > >> > i'm developing a new program. > > >> > Mission: learn a bit of database management > > >> > Idea: create a simple, 1 window program that show me a db of movie= s i've > > >> > seen with few (<10) fields (actors, name, year etc) > > >> > technologies i'll use: python + gtk > > >> > db: that's the question > > >> > > > >> > since i'm mostly a new-bye for as regard databases, my idea is to = use > > >> > sqlite at the beginning. > > >> > > > >> > Is that ok? any other db to start with? (pls don't say mysql or si= milar, > > >> > they are too complex and i'll use this in a second step) > > >> > > > >> > is there any general tutorial of how to start developing a databas= e? i > > >> > mean a general guide to databases you can suggest to me? > > >> > Thank you all > > >> > > > >> > MedeoTL > > >> > > > >> > P.s. since i have a ods sheet files (libreoffice calc), is there a= way to > > >> > easily convert it in a sqlite db? (maybe via csv) > > >> > > >> To learn DBMS you need to learn sql > > >> [Note sql is necessary but not sufficient for learning DBMS] > > >> I recommend lightweight approaches to start with -- others have > > >> mentioned access, libreoffice-base. > > >> One more lightweight playpen is firefox plugin sqlite-manager > > >> > > >> > Is that ok? any other db to start with? (pls don't say mysql or si= milar, > > >> > they are too complex and i'll use this in a second step) > > >> > > >> Correct. First you must figure out how to structure data -- jargon i= s > > >> normalization. > > >> After that you can look at transactions, ACID, distribution and all > > >> the other good stuff. > > > > > > If I have a fast hash library =A0that each hash function supports ins= ertion and deletion and can be frozen to be stored into the file system if = desired and retrieved lator . Can I use several hashes to replace a databas= e that is slow and expensive? > > > > > > -- > > > http://mail.python.org/mailman/listinfo/python-list > > > >=20 > A database with most entries in fixed bytes and types and several types = that can have varied lengths of 8 to 256 bytes. If an entry is larger than = 256 bytes, it will be saved as a file but only the file name is saved in my= data base. > =20 > Each entry is just a type and value stored in a row of my database. > I''ll limit the number of entries in a row or so called a recored to some= limit first, 1024 first.=20 > =20 > Can I do this in 1024 hashes in python ? Sorry I 'll use (k=3Dcolumn_in_a_row, v=3Dvalue) and (k=3Dvalue, v=3Dcolumn= _in_a_row) Thus, two hashes per column in my database, therefore 2048 hashes to mana= ge the data base. I'll reserve 24 entries per row for book keeping.=20 Thus the record can have 1000 entries maximum first.=20 The number of record can be very large.=20 Each value will be a string with type 1 byte and the stored value 8 to 255= bytes represented as a string when fetching the value can be auto-transfor= med=20 according to the type. The sort and search will be rewritten for the compa= rison operator.=20