دوره Using Databases with Python ، فصل 3 : Data Models and Relational SQL
دربارهی این فصل:
In this section we learn about how data is stored across multiple tables in a database and how rows are linked (i.e., we establish relationships) in the database.
این شامل 8 زیر است:
But this is basically how this, I don't know what it is, open mecker medical records system, I just kind of borrowed the picture. Our company has decided that people don't use albums anymore and aren't interested in buying whole CDs of music. It took you a lot longer to argue this last bit, this was the hard part, to say okay, genre belongs to track, it just does.
As a matter of fact, I stole this naming convention from a thing called Ruby on Rails. I took a class and it was pretty cool as long as you're nice and you don't threaten them and don't tell them how dumb they are by choosing the wrong naming convention. Here's the CREATE TABLE, we're going to say that this guy is an INTEGER, it's NOT NULL, it's got a PRIMARY KEY and it's AUTOINCREMENT, and it's UNIQUE.
And this is a good time to point out that the keywords inside of SQL like insert into, the case doesn't matter. Now when we're doing this by hand it's a little tricky and you find yourself flipping back and forth to remember like, oh which one was Led Zeppelin, which one was AC/DC? Okay, and if we do Browse Data and we look at the Album, the id was auto-generated and artist_id was something that we chose and title was something that we put in, so now we're in pretty good shape.
We just created these many database tables, we've spread things out, we've linked them all back together with these numbers. We finally have touched the relational power and it may seem painful, but this is important, especially when data scales. Except now we can handle millions or billions of rows, because we have carefully constructed a data model that makes sense.
It's going to run and read all of the library docs XML and later things, well, we won't wipe out the database every time. And so I'm executing a script which is a series of SQL commands separated by semi colons. We extracted the data from this library and we made a track database, and we have all these foreign keys.
This time we are in Perth, at the western end of Australia, the world's most remote capital city. So I want to introduce you to some of your fellow students here from Perth. Hi, my name's Eloise, and I'm using Coursera to sort of fill up some gaps in my education.
When I returned to Switzerland, I got an invitation at the University of Zurich and at the ETH to introduce computer science as a new subject. And together with type extension, and together with procedure variables, which were already present in Modula, you could implement the full scheme of object orientation. But in the meantime, which was something like 15 years, electronics had undergone a big change, you know, from, I was still trained on vacuum tubes and now they were to, not only to transistors but to integrated chips.
Okay, and I think all of you folks are envious about us because we had a very interesting companionship with our dear teacher. Another successful Office Hours with Cavesa and wonderful students here in Barcelona. So I'll put this close to your face but it's a GoPro so it's got a real wide angle.
مشارکت کنندگان در این صفحه
تا کنون فردی در بازسازی این صفحه مشارکت نداشته است.
🖊 شما نیز میتوانید برای مشارکت در ترجمهی این صفحه یا اصلاح متن انگلیسی، به این لینک مراجعه بفرمایید.