Merken

Django and PostgreSQL: An Even-Closer Union

Zitierlink des Filmsegments
Embed Code

Automatisierte Medienanalyse

Beta
Erkannte Entitäten
Sprachtranskript
don't know what the mind you know I'm people OK so I
I'm on work I'm result that is
our minds seal was ridicule experts think of were in Alameda California so you can look at the slides will be up in about a week at the build calm and my Twitter handle as x 0 OF frozen early adopters and there's my arm but know that's OK so although this so much stuff here 173 data migrations in but were specifically talk about today is 1 even 1 190 extended of introduced expanded of Django triples rest which is basically we're talking about today lots of features not much time here but we have to think more him with did was the work on this and deserves the factory formation a
few things that are we feel greenfield it's revealed the on-field we array field OK of 1st classified suppose rescue all of it feel allows you to use them directly you can store an array as a single field in both residents of vary in the future on the map and I found this you probably could have guessed that remember post rescue all will raise or homogenous type portraits I'll raise so they're integer arrays of the character arrays there's something like that about you the the camping homogenous of genius a way of life of the the so how come
they ended up with this you multidimensional arrays rectangular of I realize was people world not born before languages discarded this is a bad idea but on the multidimensional raise a rectangular so it's through its 4 inches wide by 3 entries by itself grid of both individual entries all seeking had kind you ragged arrays that I'm going to have you have 1 of these you can do query some of the basic 1 is contains so it matches the film rear left contains all the entries of right so ABC contains a b but if you probably could figure that out of an order is not important contains of you have to this by which basically goes the other way on matters of the of right with all the entries of left so that did not done that In order is not important here either of overlaps works the way you probably expect so of ABC overlaps the but of BBC does likely because they have no members account it also contain the link of the arm which returns the link to the field on left is an integer the on the so you can do queries like this where you love your acquiring for everything of linked to or whatever you might want to remember that in in less and talk about indexing of these things that's where things get really fun you give you the young if you create electric rate expression that you're ready doable tables cancel pick up every entry around checking it's like we also transforms such as I would find everything where there's where the 1st element the the zero'th element is a the on were the 1 nice thing about this is that there is a video it's walking through this and you're saving time fulfillment and there's a great field or have 7 elements in and it'll just say false it will return error so you don't have to write this a trap into that 1 downside is alleges quads you can't specify the index is 0 the 0 in this case programmatically because it's baked into the said to the on the parameter if work you can also decisis so finding everything were 0 . 0 inches your 1 match that or find everything worse Aurora to contain so you can get arbitrarily complex expressions and really slow your database down unless you index of yeah so you specified in the lexical true everything's all right wrong on this creates a B-tree index which is pretty useless on array and other non-scalar types so both has lots of index types was people are only familiar with B-tree indexes because if you say indexical which everyone does too much stop it on the then number in which again is a basic B-tree index all the trees are nice interestingly have no 1 actually knows whether called the trees they like balanced a Boeing or something like that on the really they they're kind of like a really good solution to the problem the faster compact they provide toward a at all but they're not
perfect because 1st of all B-tree indexes required totally ordered type and you know all points erasing a straw poll were does make sense me 2 points which 1 is greater than this point I mean you can make something up to there's no intrinsic meaning that the cell never feels that fail when in doubt was has your future rate waiting for you but you do just injured axis of gene indexes are used for 2 but that's a contain keys and values like arrays in each for Sunday in just a for things that this is my really big I sound so smart you of the walls were mathematician of G just as you 4 types of partition mathematical space like a point or range or something like that on this part about that is what you create them just like any index they just work if you can optimize aquarium will you don't have to say 0 by the way on the square users index so indexing reveals on generally 1 injured index I'm any accelerates contains contain bite overlaps it doesn't help with links a slight sorry but on but you kind of have to use erosible migration whose use were will migrations everyone gratuitously put 1 into your next push just to get familiar with the new world it was spoken in view of the so you can throw in this fancy using June field clause 1 downside of gene things are not freed update on that's updated but in fact when you do a vacuum and that makes no sense at all to you just ask about on so don't create what was needed specifically it's a small table like an easy little mapping table exactly memories don't go do this but it's a big table you but of so you say well I think I was promised by an earlier slide which would show me how did to accelerate the search on Wingfield that's how you accelerate the search of Winfield what you're doing there is saying I wanna create 80 index on the expression or really feel come 1 the common 1 is the dimension so you're saying on the 1st dimension of the stable remember for trend it's back i so if the next slide you can also do slices if for example this is something you do a lot you can create 1 of these processes this is really smart it when you use this expression in a query ill-defined at indexing users I just remember also post groceries or 1 based not 0 based like every other programming language you know since value of focus from my it different than I the so why would you use well if the underlying it actually is the right sometimes you what operates in a database of and they can be a replacement for many to many table you want we can chat about later about how that you hallway track about how you might do that the the you can also add is very common use them as the normalization if you really expensive query in water stuff that result in the database and the result of it happens to be right the OK range fields range feels just are wonderful on the X the arms the are about a star of about the span a range of a scalar technical rebound sites of for example 1 comedy is it in for Asian includes 1 through a within the brackets the square brackets mean inclusive you can also do friends which are exclusive which only goes up through 7 that's really candidates like a float because or some infinitely divisible type and that's the default all of you in a minute about mean all values greater than or less than so these also have a special infinity value which cycle PG does everything it can to handle in a nice way given that there there's kind of this impedance mismatch between what was the time and I thought the time 2nd the 2 which is Europe's library of your of or that all inclusive range-based type that handles all that stuff for you so you probably when you're using it inside your application code 1 port that and use that is your actual application type
of money and thus 1 I support in his range and begins range full range the time range in of using do contains the bite overlaps they were previously expected of you and also you fully less simply greater than so they're completely destroying 1 way or the other he said gesturing wildly on an adjacent to is means that they bubble against each other exactly there's no values missing between and not was then than and what we expect on this is for user just index on it looks just like gene in 0 you say just this antigen an accelerated everything we talk about who was really fast and why would usually cultures are really hard problem and we we had a good solution for it into we had range types so you're writing a booking system because you know people do things like that it a delighted book is to be inserted into the the same room where these overlap OK you want constraint that prevents that situation from arising in the database with traditional unique there's no way of expressing that because you're not talking about a unique range because the Rangers could overlap but they're they're not equal so they don't do that but but this as a feature because was was has always has a future call constrain exclusion that will save you of constraints solution is a generalization of the idea of unique indexes which is basically said allowed to equal entries based on this set of comparison operators so it's generalization beyond equals if these 2 things pass this comparison operator which could be equals or could be something else of into the table like those could be overlap for example the necessary some pretty good if you could only be any index supported boolean predicate on the entity and they're all added together some
there's 1 catch which is actually a single index range types urges indexes so the index has to be adjusted acts but by all the simple scalar values like the room number which was probably character field integer don't have just indexing of year I lied to you this feature will work at all about the I'm this extension built and both critical tree just that gives you all those just OP indexes forcible types like unitary character is suppose this extension as part of Contrail you can use on the news created create extension migration to get it for you but it should suppose chrissy don't have to worry about it not being there on any insulation it is used create such a migration operator here that OK so sounds like In Europe model you say I have a look at and it's a character field and in the end the data looking and all usable reservations right 1 we can project that I and so you when you run a migration and that's what it looks like you know it has the usual integer sequence that we all love so much involved in gender of the room and dates and primary key but who cares about barbecue revenues that that's the thing running this really exciting looking statement which if you are adding exclusion constraints that says don't let anything over the room is equal and the dates overlapping inserted into this database this at at at is the is the post this version of the overlap operator brainy look at so you know that people be so impressed with the use of wikis I say you created this looking you create range they say that they say well OK suffer from database of better about that better work lot of you create another 1 of the those states overlap they shipped out there of the you create another 1 with the exact same time this different room that's fine and now we're created through a back in that room except where check try to check in before that shipped out and then you get people ball or stack-trace integrity Europe it and let you do that we to catch that an reducing narrative or you know whatever of celebrities reveals well you probably want to use of represent ranges that's a good idea of the more natural than the traditional HeIlo thing that we were stuck with before we had them in and you can do all this kind of cool database integrity check on the so In
headaches or field it sure feels a boring without a talk
about those only because they have been
so that you can read about them if you want to because we have a new hotness which is adjacent fields on their doing 1 9 on any support arbitrators on structures and the sword as g sine B because J propose Chris has 2 different subtypes I it supports the usual stuff contains it contains by both value have to match has key which tries to substructures the particular he also has keys finds everything that matches the leaders in know all this stuff and has keys so all In the
past I queries you know you can say find me enough I need the DA is adjacent fields of by the data that has an object over the has a field name whose values ball great this will the straight out of the box on you can use of array indexing if there's a J it's it's also the the owner of the past which is in radians identities substructure about oppose was rated trees lottery No. 0 as fish the 2 remember said the 2 to reduce subtypes adjacent edges of the graph of G silent stores the raw text of the G sort of white space and all exactly the way you put it is in fact just the syntactic wrapper around the text type on G somebody is a compact indexable representation is like B's on only much much better I'm so when you choose on is in are just as a little passage inserts does have a poor dual is pursing find on in the 2 dubious features that some people because based on all the started using injuries of which are duplicate object he's at the same level which is not supported in the spec In the logic keyword where the idea being if you storage is on field that has a key field will be always come out maybe there's nothing inspect it requires this behavior the of the 1 thing to use Jesus of course if you're just logging data you don't really expect to do a lot of query monitor is faceted search on basically everything else you want Sunday and the biggest advantages Jason becomming that's useful ways unlike trees on and it is occupied kg g sine beginning with just role the entities not so we Eugene indexing remember this of a key value pair kind of stuff on it supports the of has the completely has the on has has a single key is the the path has a single-key as any keys has all here yeah I 1 thing to remember is right now there's no single operator this post this is finally this use of field that has this he at any level in the structure you have to look you have to start a probable walk away finding things I you query them but only and has the root of the problem is isn't as big a restriction as you might think but it is a restriction so would use well before logging days on data like API calls that's good reason on you he has occurred on a table that works across schemas this is a big problem in in relational databases you want on a table that every time you change something you spent a record into a table with says I changes that is both what schema does that on a table have it could hear you might have that is that you have to create a separate table for every table year-to-year the database that gross war is Butler J. side you can just turn the on the record into adjacent wall start writing isn't it's a friendly readable way apical entries on objects that isn't of the doesn't have like in given security problems like C pick oriental on In you use it for actually to rear feels for example you're building a system going play it but your model is what it is but you want the user to be able to create their own objects like it's in the patrol student 1 we will create cholera sized something like that is sort of adjacent to not have a modified scheme in the field and other goodies on most of these things have everything has admin widgets that go with that of course on the shorter so we just had really want good for the but because it's like you this textbook very you deal with that on if the full-text search doubtful that serves as a tender 110 features which is invaded everyone downloading given up on it's it's samples whistles had full text search built for a long time all 110 finally contains 1 little support for all 1st you have to get some concepts down and this is a little bit more directory around I have to go back to the dock sometimes others there's this thing called the expected which is a block of text you think of it like a blog entry or the description in a catalog they like capital block of text encoding for full-text search 2 transformations have been done on it to normalize the strip all the the of uninteresting extensions out move the stop words all that stuff instability was beside of doing a transformation wires this thing called a configuration which I am not going to go into because we could is that the entire time so I and II there right now OK I want to plow through cause I wanna get through this of
so the has a bunch of configuration is generally just use those like English is the standard 1 is used on 28 factor is a function of build upon grows the takes x returns it's vector like that fortunately you don't have to worry too much about this general calls the of the would for most situations and then you have a search functionality so you can search text field using full-text searching using the underscored research predicate query that without indexes it does a sequential scan which is bad so you don't wanna do that you can there's a chance that a search vector object at the top level and in Django that were of factor more than 1 field at time by combining them merging searching happens query runs search query represents a query object objectives of the stemming and things like that so you can use searches like that goal on you could suppose also has rankings so you can sort things in relevancy order and all what on there's lots more the size of the online on the part of the important thing to remember is you need index which is a gene index In order to make this work fast you can combine local fields with different weights and all this kind of stuff of generally need user-triggered to do that kind of stuff this examples in the documentation on how to do that and those 3 things we read
books which world was voltages which is note
and few few the theory that virus and the video and a ch th th th so you see
your so
Resultante
Computeranimation
Expertensystem
Videospiel
Computeranimation
Rechenschieber
Mapping <Computergraphik>
Datenfeld
Twitter <Softwareplattform>
Ganze Zahl
Migration <Informatik>
Datentyp
Dateiformat
Faktor <Algebra>
Array <Informatik>
Resultante
Prozess <Physik>
Punkt
Program Slicing
Formale Sprache
Kartesische Koordinaten
Element <Mathematik>
Skalarfeld
Raum-Zeit
Computeranimation
Videokonferenz
Netzwerktopologie
Arithmetischer Ausdruck
Poisson-Klammer
Wellenwiderstand <Strömungsmechanik>
Default
Array <Informatik>
Parametersystem
Sichtenkonzept
Datenhaltung
Abfrage
Bitrate
Rechenschieber
Arithmetisches Mittel
Datenfeld
Twitter <Softwareplattform>
Hochvakuum
Rechter Winkel
Ganze Zahl
Automatische Indexierung
Festspeicher
Mathematikerin
Ordnung <Mathematik>
Schlüsselverwaltung
Fehlermeldung
Tabelle <Informatik>
Web Site
Hausdorff-Dimension
Wasserdampftafel
Rechteck
Zahlenbereich
Zellularer Automat
Code
Weg <Topologie>
Spannweite <Stochastik>
Migration <Informatik>
Datentyp
Programmbibliothek
Hilfesystem
Programmiersprache
Matching <Graphentheorie>
Mathematik
Binder <Informatik>
Partitionsfunktion
Fokalpunkt
Unendlichkeit
Mapping <Computergraphik>
Viereck
Quadratzahl
Dreiecksfreier Graph
Mereologie
Normalvektor
Nebenbedingung
Folge <Mathematik>
Subtraktion
Versionsverwaltung
Zahlenbereich
Skalarfeld
Computeranimation
Netzwerktopologie
Informationsmodellierung
Spannweite <Stochastik>
Migration <Informatik>
Unitäre Gruppe
Datentyp
Maßerweiterung
Nichtlinearer Operator
Befehl <Informatik>
Datenhaltung
Eindeutigkeit
Systemaufruf
Disjunktion <Logik>
Einfache Genauigkeit
Physikalisches System
Paarvergleich
Wiki
Integral
Prädikat <Logik>
Datenfeld
Menge
Ganze Zahl
Geschlecht <Mathematik>
Automatische Indexierung
Mereologie
Schlüsselverwaltung
Tabelle <Informatik>
Aggregatzustand
Sinusfunktion
Datenfeld
Besprechung/Interview
Störungstheorie
Datenstruktur
Schlüsselverwaltung
Computeranimation
Bit
Einfügungsdämpfung
Web log
Selbstrepräsentation
t-Test
Raum-Zeit
Computeranimation
Übergang
Netzwerktopologie
Deskriptive Statistik
Nichtunterscheidbarkeit
Wurzel <Mathematik>
Array <Informatik>
Sinusfunktion
Lineares Funktional
Nichtlinearer Operator
Physikalischer Effekt
Datenhaltung
Computersicherheit
Güte der Anpassung
Gebäude <Mathematik>
Abfrage
Nummerung
p-Block
Teilbarkeit
Prädikat <Logik>
Datenfeld
Automatische Indexierung
Ordnung <Mathematik>
Verzeichnisdienst
Schlüsselverwaltung
Tabelle <Informatik>
Subtraktion
Gewicht <Mathematik>
Quader
Schaltnetz
Online-Katalog
Transformation <Mathematik>
Lokaler Körper
Mathematische Logik
Datensatz
Informationsmodellierung
Rangstatistik
Widget
Datentyp
Wrapper <Programmierung>
Stichprobenumfang
Speicher <Informatik>
Datenstruktur
Maßerweiterung
Konfigurationsraum
Relationale Datenbank
Graph
Vektorraum
Physikalisches System
Quick-Sort
Ordnungsreduktion
Objekt <Kategorie>
Mereologie
Wort <Informatik>
Computervirus
Physikalische Theorie
Computeranimation
Videokonferenz
Computeranimation

Metadaten

Formale Metadaten

Titel Django and PostgreSQL: An Even-Closer Union
Serientitel DjangoCon US 2016
Teil 18
Anzahl der Teile 52
Autor Pettus, Christophe
Lizenz CC-Namensnennung - Weitergabe unter gleichen Bedingungen 3.0 Unported:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen und nicht-kommerziellen Zweck nutzen, verändern und in unveränderter oder veränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen, sofern Sie den Namen des Autors/Rechteinhabers in der von ihm festgelegten Weise nennen und das Werk bzw. diesen Inhalt auch in veränderter Form nur unter den Bedingungen dieser Lizenz weitergeben.
DOI 10.5446/32690
Herausgeber DjangoCon US
Erscheinungsjahr 2016
Sprache Englisch

Inhaltliche Metadaten

Fachgebiet Informatik

Ähnliche Filme

Loading...