Morning, everyone sorry for the mumbling at the beginning. There I was just.
Trying to play with my emacs. Web browser.
I don't use it that often, but I find it useful in class.
So what I wanted to start off with is, first, st people are asking about due dates and things.
So I've added a new column to the tutorial section.
There's a show by column.
The show, buy it basically says you need to show it to your Tas.
By this date. In order to get credit.
So it's not tech not quite a due date. But you have to find someone to talk to by them.
So you'll notice for the 1st 2 tutorials. The show date is October 7.th
And then after that
For the next 2 tutorials. It's October 16.th
The idea is, the the midterm is going to be on.
The 1st 4. The content of the 1st 4 tutorials, which will be the content.
Of the 1st 2 assignments.
There will be another 2.
Tutorial that comes out before.
Fall, break. So before the midterm exam.
That one. I'm not. It'll come out.
It'll come out a week before the break.
And I will cover it. There will be stuff that will help things, but it won't be directly.
Impacting the.
Second assignment, so won't be so much there. But it will be kind of more.
Supplementary material which.
Which will get more played with in the latter half of the course.
For yeah, again for
For tutorials. All you have to do is
You just have to show it to the Tas. Get checked off assignments. You have to submit.
Not all the right. Now we're a bit behind uploading the tutorial grades.
I need to
What we're doing now is putting them into a spreadsheet mostly. And I need to update.
Upload that to bright space. I will try to do that after class. So.
I'll I'll post a message once I've done that.
So. So there's a question here now about assignment. One.
And the question is, is so.
You know. Question there, will. You won't require us to change. There'll be any code you want us to change.
This is assignment, one.
So questions, one.
To.
You know, one and 2 are just about how it works.
3 is, if you make mine type an Async function. So.
For this you should do that.
So, yeah, you kind of should change the code and run it.
And do this, and for this.
How could you modify so this, when I say, how could you modify? I mean, describe the modifications. So that means actually you should modify it.
And do that. But so.
But this is so. You're giving the code for this change.
And then you're supposed to explain. How did those changes.
What change we are implementing that.
And then how could you change? Sort of loaded the page not found template.
From a file. So again, this is all about.
These are code changes. So rather than give me a new version of the file, I want you to put in line the code that you would change, and how would you change it to.
Yes, you should add, you should add, your code changes into the text.
Of your answer to the question. If you don't include.
We can't give you full credit you should describe. You should basically say.
A at this line. Insert these.
You know. Answer this.
Look back at previous assignments.
For the 2016 thing. If you look at the solutions there, you'll see what I'm talking about.
So I'm just going back to the question. So yeah, if you got a 4 on the tutorial, you should be fine if you got checked off.
You should find. If you don't see any mark in the grade book, let me do an update. It should be there.
I'll check to see if there's any. Once I update the spreadsheet, let me see if there's any grades. But I think.
Now we then we should be up to date.
Oh!
I was trying to access previous lecture recordings, but it says I need a password.
If you're trying to access.
Previous recordings.
Through bright space.
And you go to the Zoom Repository.
There are. It does say you need a password to it, but it puts the password into your clipboard when you click on it, so you just do a paste.
And then it has the password, and you should be able to view those recordings.
But of course, if you go through the wiki.
And look at the recordings. You don't have to type in a password. Those are world.
For a question, for.
So there's a question here of, I think this private direct me about whether you know.
Sorry. Question. 4. About, how can.
How to do so get request
I'm not gonna say anything about the relationship between this.
And the tutorials.
Although I will say the tutorial 3 may give you some insight into this.
But up.
But no, I'm not. I can't answer anything about that.
Not at least sure.
Did you run the assignment code.
Should the assignment code find a non-air page when 1st run unaltered.
Good question.
I'll say the assignment code as it is, is.
What it should be
Yeah, so yeah, should it be an error or not? Yeah, that's that's question, like,
What day is the midterm?
We go here.
Midterm.
October 29.th
And class online.
Okay.
The assignment. Submission is a text file with line feed endings. If it passes the validator, you're in good shape.
Our line numbers required for the assigner is context.
Contact. I mean, it should be clear.
Don't confuse the ta. So I mean, if line numbers help, you understand, do that. But if you can say in this function after this statement, incorporate this.
That's fine. This this code isn't that complicated.
Is there a reason? We are changing the mind type function to Async. All the operations inside it run.
In constant time.
Clearly, the code.
I didn't make it a I made it non async for a reason in the original version.
But that's not what the questions asking.
I'll just say that.
So there's a i got a direct message. Is there a.
If you're behind on a tutorial.
Can you show it to your tear in a later tutorial class.
Definitely. That's what the show buy is.
Show it by this date, and Tas are willing to see older tutorials.
During tutorial time.
That is your time with your tas to work on the tutorials. It's not necessarily the newest tutorial. It's any of the tutorials.
But you know, if you are behind, then you know, it can be harder to catch up, and you might want to go to the office hours.
To show things.
Any other questions.
Okay, so
If all things come up, please go ahead and message. I think I covered everything.
If I missed it in the chat. Please resend.
Otherwise, let's.
So what I want to talk about today. So we are at.
What does what does class online mean?
It means that
The midterm exam is during.
This time period. It's from 1130 to one now.
There are
There's students who do it asynchronously, who are in the other section. So.
The time will have to be a little flexible for them.
And so there's gonna be, you know, technically this, I'm gonna have to figure exactly the spread of ours or something. But.
Basically, I want you to be taking it this 1130 to one slot.
And it's you basically are gonna you're gonna submit.
Your assignment, just like you submit, you submit your midter exam, just like you submit your assignments.
It's gonna be the same format.
So can you go to office hours for help with tutorials? Yes, please.
Do so
What are good things to view for the midterm? The midterm is based on the 2 assignments.
So, if you understand the material and the assignments.
Then you'll understand what it's. So it'll it'll be on bright space. But just in terms of you'll submit it. It's you're gonna just create a tax file and upload it.
Now, does that mean you can use
You know, outside resources and things like that. Yes.
But remember that for the midterm we're going to be.
Just like for all the material we're gonna start scheduling with people randomly to see on their progress.
Particularly after the midterm.
But right now we just have a sign. One hasn't even been submitted yet. So it really just makes sense for us to have these interviews.
After you start submitting written materials.
So we're gonna start asking you questions and going like, okay, so how'd you do this? What was the.
You know, and and talking to you randomly, and so.
If you aren't doing your own work.
And we find that in your.
When we do this, then we're gonna have to send you for disciplinary action. So.
You should, I mean, make an honest effort to do these things. Don't just.
Get someone else to help you or get an aid to do the assignment for you.
Will you be given solutions? Oh, yes, I will post solutions to the assignments.
Yeah. So yeah. And so the midterm is, yeah.
The midterm is not based on the lectures directly. No, it's just indirectly based on them, because all the materials there. So I'm trying to.
The so the lectures I talk about like this much stuff.
The tutorials are this much stuff? The assignments are like this, and the midterm like this.
So it's kind of an inevitable.
Winnowing of scope.
And so trying to give you the context.
So let's.
I think best. If you're wondering what the lectures are for.
Let me like talk about things a bit.
I don't think he should go on, but the lectures are really to teach. And so one of my basic ideas is, I do not teach to the test.
Because there's much more material to cover.
That I can possibly test you about.
And anyone who wants to learn this pill realize there's a lot.
And let me show you what I mean.
So if we talk about form demo.
When you look at the code in form, Demo.
If you look at this code, this code.
Is Javascript.
Here, but this.
Is HTML.
And this.
Is Css.
And oh! In the next tutorial, which will be for this program called dB. Demo.
dB demo will be
Is basically form demo.
But with a database.
You're gonna see? Sequel.
So.
What do I mean by that? So we're right now@octoberfirstst Wow! It's already October.
So in normal web development.
Just regular web development. Fancy about it!
You're dealing with at least.
4 languages.
Potentially 5. So when I say service could be Javascript.
It could be.
Python, Java cart.
Basically anything else.
You know, or I'd say these are Ruby.
So I'd say those are kind of like the major languages. You'd probably see server side.
Although you, you literally can write.
Have server-side language, be anything.
So. So the question is, HTML is a language like Javascript. I'm saying that
All of these are.
I would argue programming languages.
I think.
I am pretty sure, so.
Do you all know about turingeness.
The midterms gonna be online.
So there's this.
Oh, oh, how sad! So there is a concept of.
Turing completeness.
I so.
I'm not sure if HTML is turing complete.
Think Css is, could someone do a quick search to see? Is
Basically a seat. Is there anything or css. During complete.
So hmls, though.
Okay, so Asha Css. Has got some weird structures in it.
The reason why I so.
So the only thing I'm full programming is a language that is turing complete. So what is Turing complete.
It's a language that.
So the idea of turning completeness is, if in that language.
You can implement.
A Turing machine and a Turing machine is.
This is signed from theoretical science. It's a.
It's an old idea, but.
This little finite state machine moving along an infinite.
Tape of symbols.
And processing them. And so, if you can.
Simulate a turing machine.
In your language. That means your language can do everything a Turing machine can do. And so it is.
Turing, Complete.
Css. Is turning only conjunction with an H to basic file. Oh, that's hilarious. So.
Okay, so that's.
So that's what we normally think of as program language.
So this is sort of a general
Observation, like just any configuration, file and application as a.
Written in some sort of programming language. What's a programming language? So language that lets you tell a computer what to do gives it a program. Now.
What the abstraction of that.
Program is, and what the constraints are.
You know, can vary widely if it's a Turing complete.
You can express.
Any program in it.
But yeah.
There's lots of more constrained languages for specific purposes.
Those are known as domain specific languages.
And they are also very real languages. Now.
So there's a tendency for domain specific languages to.
Increase in size over time.
And as they get additional features eventually you get enough features together. It's like, Oh, I can simulate a turning machine. Guess we've got Turing.
I tend to think you generally have made the language too. Fancy, then, I mean not to say.
And of course you want some languages to be turning to like your regular.
Java Javascript, whatever, but.
Does HTML have to be turning.
Does it? Really? It's solving a specific purpose.
Yeah, so so there's a.
If you go down various rabbit holes.
There are
All kinds of random things.
That can be shown to be turing, complete.
Things that you wouldn't think, or that actually, that capable turnout to be turning. It's, you know, using very weird kind of constructs and stuff.
Now, does it make it a fast computer? No, but could turn. Completeness is not about speed. It's about express.
Expressivity.
But again, we don't need turneness for the language to be respectable and useful.
You know again, that's what. And in fact.
So.
Rather than a classic solution in computer science. For how you solve a problem is.
Define a language.
That could in principle express the solution to the problem, and.
And then create the solution in that problem.
Rather than just taking whatever program languages you have.
And then creating a solution in it like, why have the extra step of the domain specific language.
Because it makes it easier.
Makes it easier to think, because really a.
Audible.
2 problems.
Like part of the reason why computer science has so many different languages.
Is because it's people trying to create a language that's suitable for solving certain classes of problems.
And just because the languages are.
Computationally equivalent, which is really say they're all complete doesn't mean they're equally.
Solving the certain problems like, for example, language.
But C. As a programming language.
Has atrocious string, handling, capabilities.
It's a real pain, but of course you can make it do anything. And in fact, it's kind of the.
Low, level language. So much of our infrastructure is built in.
So of course you can do string manipulation. But, in fact, what oftentimes people do if they want to manipulate strings, is.
Create a program to create a language for manipulating strings, and then do their solution in that other language.
So.
That's what. So that's why I say, when you see a markup language.
Yeah. So would you say as well is a marketplace? Yeah, exact. It's like, I would say, that's a kind of gatekeeping.
When you say you know.
Now again, it depends on the markup language.
Even if HTML isn't.
Turning, complete.
Other markup languages are.
And in general to make.
A markup, language.
Like there is something called
D. HTML, dynamic HTML, which used to be used a lot on the web in the early days.
I'm pretty sure dhl was touring complete.
Was close to it.
But then whatever so.
Yeah, so anyway.
So we've got these.
Different programming languages.
So why do we have so many programming languages on the web? It's because we have many sub problems.
To solve. It's not just one thing.
So, for example.
So HTML is the structuring content of a page.
Would you want to use.
Another language, to.
You know, like something else to do. What does it? Can you do it?
Yes,
But we saw if you go to.
But if you go to Form Demo, we have HTML.
Incorporated. This is. This is ugly.
So here's the rare company. So.
We have our code here. This is all Javascript Javascript, but then we stick in this HTML.
In the middle.
And you can see when you're looking at the context of Javascript. It's like.
It's kinda ugly.
Like this doesn't fit there, but.
How would we?
Do what this is doing.
In a Javascript way. Well, there is a way to do it in a Javascript way. It's called the document object model, but that's really good for.
Manipulating a page.
Not creating the page.
So that's kind of up.
Yeah. So so you know, HTML's very nicely for describing the structure of a page.
Then we've got Css.
This is.
Now, you might say, well, why does Css, well, people started. HD, originally Css didn't exist. There was just HTML.
And people started trying to add in.
Styles to it.
And there was like, No, if you look at old style, you know. Hml still has like things like the bold tag and the italics tag and.
Things, and.
How do we do things in more fancy way?
At least I realize. Wait!
I really want to have some uniformity to how these things are like, I want.
Everything in this block. I want all the head, you know headings to be this to look like this. I want the paragraphs look like this. I want this block like this. Look, it's sort of like Whoa! I need a whole language.
To describe styling.
And I could try incorporate into HTML, but it makes the HTML really ugly, and it's not reusable and stuff like that. So they.
Create an entire, separate language.
Which was designed to integrate with HTML.
Like css doesn't make sense.
By itself. It's it's.
Css. Is a language for talking about. HTML.
So. And this is oftentimes what you have happen is like, okay, you have a language for a given domain, and then you can have a language on top of that, a language on top of that. This sort of.
Whatever the right abstraction is like you, you define a level of abstraction.
So I'm saying, if you look at any Api.
Or
Any Api or set of options. They're really defying a language for talking about a problem.
And that language is
If you this language you could
Forgot what I was saying.
Anyway.
But but you'd have these. So Apis can be thought of as a language Apis we thought of as a language.
Apis are
They, they typically only have a syntax of the original host, language and.
Things. It's like it's expressing a language inside of another, and.
It's oftentimes better to just say it. I'm gonna define an entire syntax and semantics.
That may be implemented with objects in an Api. But it has a nice thing for me to be able to think about the problem in a nice.
Clean way, and not have this other language bleed into it.
And that's really what we're doing here.
So hml, css.
So this is kind of the original conception of the web. HTML was there to.
So Acl would be the structure of the page. Css. With styling Javascript was to make a page dynamic.
And then.
You had
So Lou!
So you could say all this was coming from static pages on the server.
And then we said.
That's why. Ha.
This is why I do use simple web server as a thing, a simple server. Why, I want to start off with that. Because really, that's what originally a web server was. It was just something.
To serve files.
And maybe you could upload files. But that's really file.
Oriented, and then you had HTML.
And then Javascript was added to say, really it was HTML as a file server.
And then people said, Okay, Css. Is kind of still on that kind of level, though it came later.
Javascript was trying to make things dynamic, but.
There was this thing called CGI.
Does not computer graphics.
So this was the original idea. Most of the website would be static.
It would just be files that were returned.
And then.
But then, when you want to have dynamic, you'd have special.
Files on the server, which were actually scripts, IE.
Pearl programs. I say pearl, specifically, because this.
Pearl was the language of CGI.
It wasn't the
Only languages use, but it was by far the most common.
And so you would have.
A pearl script running on the server that gets run every time.
A certain page was loaded, and it would do something.
Whatever you want.
So.
And just historically, you know, 1st you had Pearl.
Really was the language where you'd run an entire pearl program.
And then reply, output, and then you got Php. And the.
Key difference between these.
In terms of runtime is pearl is very much like Python.
It. Syntax is a bit funky, but it's it's a regular programming language.
Php.
Okay. I'm switching it.
So server-side rendering is a bit of a
I'll I'll get to side rendering in a bit. That's that's not where we are right now.
How's Apache factor in so.
Where did I talk about here?
Based on.
I think it was the mosaic one.
Anyway, but but that I would I should check that and see what it was.
But anyway, but that doesn't. That's just a little bit of history.
And the reason I'm talking about history, by the way with the web is because you don't really understand the web.
Accepting or historical context, because lots of design decisions.
Seem utterly bizarre.
Unless you understand how they were made.
Which was historic. It was this incremental platform that was built up. It's not what you would build.
If you kind of cleans, you know, saying these are my requirements.
What should I build? That's not what the web.
How the web was built.
And so having that mindset is just gonna make no sense.
But so.
Php was, I'd say, one of the earliest, not gonna say the first, st like Php. Still widely used.
But it's a language which understood. HTML, in fact, was designed to be written into HTML.
And
But it would just run on the server.
Now. Why, we're talking about Javascript.
That's really what Deno and Nodejs.
Really comes thing. I want to share code and data between the client server, the clients running Javascript.
Why not just run it on the server? It also turns out
That adds nothing to know, like.
Javascript has some things about it that make it not the most efficient language, but Javascript runtimes are.
Piece, because so much engineering has gone into making Javascript in the Server fast.
So really what Javascript of the client fast.
So Javascript was like, wait. We developed these great runtimes for the browsers.
Why don't we use those on the server? Because really the Runtimes for languages like.
Python, and things.
They're not so great.
So why don't we just use Javascript.
So. But going back to this sort of.
Sort of no, again, I'm not trying history, but just sort of giving you a kind of a general conceptual model of where these things came from.
So you know, we had Phpic stuff. And then Javascript really was like.
Why don't we use the same language so.
والسيدة.
So.
So this is the version of the web that we've seen.
Now this is not.
A.
What do we do? Instead, today we send back and forth job objects in the form of Json. That's a bit more of the structure of modern web applications.
Rather than this.
And we look at what these are mostly transport of Json objects.
You know Json is just a format. It stands for Javascript Javascript objectation.
That's what's going back and forth.
Why Javascript objectation. Javascript notation. Json is a subset of Javascript.
The client understands that.
The server could easily do it, because it's rather simple.
And then they both got specialized support for it, and so.
That's the data format of the web that we're data sent back and forth.
Sort of emerged. I mean, it's history is kind of interesting, but.
So now all of the HTML Css. And Javascript, the client, and so like they're all still there.
But they're there to exchange.
These objects.
Which kind of looks more like a way of.
Doesn't make sense from a computer science perspective.
I want to send data back and forth. I might as well sort of object. And I'm gonna send it back and forth. That's.
That makes intuitive sense, because on both sides we have objection. Languages.
Am I gonna process data and code? I'm gonna process in the form of objects. So.
Here we go!
Up.
So there!
The modern web architecture.
Is not
It's it's not necessarily gonna stay the same in the future. And I see a lot of things that may actually change it. A good bit of, you know, as time goes on.
But
But the path we got here was not a straightforward one.
At all.
And so keep that in mind. When you look at these things like this, all.
Change the room, but
So that was the early lamp.
Stack was, you'd have Linux running on Apache with Mysql.
Sorry.
Dealing with, you know, Php and pearl more php, but early.
So this is where we're gonna go starting.
On Thursday. It's gonna be the last big.
A piece of concepts.
That I want to talk about before the midterm.
In terms of.
How it all fits together.
But going back to.
What I was talking about here was domain specific languages. Here.
And so here I talked about.
You know, structure page.
Styling of a page.
Meet the page. Dynamic.
Where does SQL. Fit into this.
What is SQL. The language of.
So SQL. Is an old language of relational databases. Do you all know what a relational database is?
Have you all talked about that at all.
I didn't think so.
So.
I assume you learned about it outside of classes, right.
He learned about SQL.
So a database.
So 1st of all, let's talk so.
Database that I'm a problem for managing. How do you manage state.
How do you manage information that changes over time?
So up to this point in your education.
Main thing is.
So what's the apu.
What's the Api of a file.
Open it, read.
Right.
Seek close.
So what are files?
Yeah, open them. You close them, you open them. You're right to include.
But really.
So we can think of files as a hierarchical key value store.
Path. Name is the key.
And the value is the contents of the file.
And you mostly.
Most, while while you.
So if more than one program wants to modify one file.
Things get messy fast.
Because.
The last one to write the file. Let's say you have 5 applications. They all open up the file.
Like you have 5 text headers. They open up a text file.
They're all editing the file.
What's going to be the value of the file on disk.
It's gonna be the value of the last save of any of the text files.
What if one of the files, one of the editors changes of files beginning another text that are changed a lot line at the middle, another one at the end, I mean.
Those are not going to get, say, all preserved.
Only while they some of them may notice like, Hey, wait.
The version I have in memory is different from the version on disk.
Someone else change it behind me. What do you want to do.
And you'll know. Oh, my goodness! This file might be corrupted.
So I better not.
Overwrite the other changes.
So.
I'm guessing a lot of you haven't seen this issue.
I've certainly seen this issue at times when I've had multiple copies of emacs and trying to edit things and realize, oh, whoops! I'm editing the same file and multiple editors and.
I've changed here notions, old, and now I'm saving it, and I'm gonna lose my changes. So.
That's
That's a problem.
So.
So if you have data that's just being read doesn't matter. Who's doing the reading.
If you have only one writer at a time.
Files are fine.
But if you're talking about a web server.
That's not what happens with a dynamic web server.
Me think about every requesting client.
Every request. If it's a dynamic web server could require changes to the store data. I mean, you have a thousand.
You know, clients that are all doing post requests.
This is an entirely realistic scenario that a thousand.
Web browsers all contact in the same web server, setting all post messages.
And this is how to update.
So what do we do?
How do we keep this all from?
Really was a big problem for early web servers, because.
Every incoming request.
Was handled by a separate process.
So.
So these are concepts.
That are really more properly talked about. An operating systems.
So what do I mean by contacting the website?
So remember the way we're playing with this web apps.
So let me be. Let's be concrete.
So here I am right now on my wiki.
This wiki is actually running on Apache.
Believe it or not, on my
You know, on my virtual machine homeostasis.
And it's running an application.
Called Media Wiki, which is written.
In php.
So.
Which is running also, I think, on my SQL. Database.
But in the background it's a Mysql. Yeah, I think it's Mysql. So.
Again. This is an old web app.
Because Media Wiki's been around for a long time, as Wikipedia been around.
So that same architecture is there. But.
That's why the URL.
You see this index? Php, up here.
That Php stands for. This is indexed. This is a Php script.
That is running.
And it's doing queries.
To the to a Mysql database.
To get the contents of every page.
In my wiki. So when you have.
Each of you in the class could access my wiki at roughly the same time.
And you all could be, you know, accidents, and then the contents of this is all in a database.
Rather than being in files. Now some contents and files.
Like. For example, there's an initial which is not being shown here. But there's an image.
That's shown in the top corner.
You know, if you're depending on what format you have, that that one is not there. And then some of the things like you're loading up page, those that static content that is served.
But in addition.
Most of the content is dynamic.
And let's say I go to one of these page. You notice there's all these pages.
They're these!
Edit things.
Let's see. Do you see a nice little edit.
View, page, source, read view, history.
So I can view the source.
This is the source of the page.
You can see it here if I'm logged in.
To this wiki. I can edit this.
And when I edit this page.
It has to be saved.
To the back end. Database.
And I might be the one editing it now. But what if 100 people are editing the same.
Wiki.
And what if most people are editing the same page? Now, Media Wiki doesn't.
Deal that well with concurrent edits to the same thing, unless.
Editing the
Different sections. But like this is.
Think of Wikipedia! How many people around the world are accessing the same.
Documents at the same time, and making edits to them concurrently.
Like there's all that's.
That's what a database lets you do.
Yeah. Merge conflicts. Yes, you can get merge conflicts.
With it, but everyone can be editing different articles on.
Wikipedia all the time, just like on my wiki.
If I gave you all access, you all could be editing this.
Concurrently all the time, and the reason why you could do it concurrently is because all of that stuff is going to a database.
Which is handling all of that.
So.
Remember, web applications are not meant to be accessed by one person at a time. You're building a system to be accessed by many people.
The same time, or at least in an arbitrary order.
You have potentially limits on how much hardware resources you have. And you may have to structure things differently, like one computer may not be fast enough.
So you have to distribute the load over multiple computers and things like that. And.
The web is designed to scale. And we're gonna talk about how it's designed to scale.
Over time when we talk more about authentication and cookies.
Things like that. But.
First.st
Let's just talk about databases.
So, yeah, this is where your mental model of what's happening. It's super important.
This will not make sense at all.
Pepper.
So
So SQL.
I think SQL. Goes back to the 60 s.
I'm pretty sure it does. It's not, and maybe not simple.
Exact standard, but certainly does.
I'll say.
The web developers took SQL. Off the shelf and just used it for their own purposes.
We'll talk about the structure of SQL.
In
On Thursday. But just to give you a little preview of that.
So dB, demo, is basically like.
Form demo, except it's got these weird things.
So here.
We have this
You know we have. This is a programming language. This is a SQL statement. This is for creating.
A table, and this is for inserting into a table, and this is for.
Selected. This is how you
Retrieve data from the database.
So these are SQL statements incorporated into.
Our web app. So here we've got some sequel here.
We've got some Javascript all here. We've got some HTML here, and then.
We're accessing. Css.
You know, in the template like right here.
Which I'll take this one to Css. One at Css.
Yeah. Here's the Css.
Loading this style. So css.
So you see all the languages there.
Your relational databases were originally created to.
It looks messy.
Oh yes!
It is messy
And.
I'm showing you the messy one, and then we'll show you how to make it.
Cleaner
But by seeing it all mixed together, you can see that all these things are being used the same time.
But they're created for storing data on people, money, etc.
So a table.
So what's a table? It's just a list of records.
So you'll think of it like a spreadsheet table.
Spreadsheet.
So it's just rows.
The rows are.
The individual records. The columns are.
Name, address, whatever.
That's all simple enough.
Where is the relational? What does that mean?
So relations are just ways. These table. The data in these tables are related to each other.
So, for example, you might have an invoice.
Table. So that's it's all. The rows represent individual invoices, and of course, invoices.
Go to specific customers.
And so you could incorporate into the invoice table.
Full information on each customer. The name address, whatever.
But if you put that into there, then what happens if you have multiple invoices for the same customer.
You'd be duplicating that information.
Which seems really silly.
So. But instead of having that same customer.
In
Multiple records of the invoice.
You just have a customer. Id.
And then if you want to say, Okay, customer.
What's their name? What's their address like? That's in another table of customers.
And so you just go there and retrieve it when you want to build it. So.
So you want to build a report.
Let's see, I want to get a list of all the invoices for this customer.
It would go through, you would say, Okay, I want to find this customer. I want to find customer, you know.
Mike Jones. I go into the customer table.
Find the customer in there. Did I say? Oh, that customer has this id number! Let me now go to the invoice table and pull up all the invoices that have that id number.
And then I get a whole list of.
Invoices, and then I.
Print, you know, create a document.
That lists all those invoices and lists that customers.
And it's all like this is what you're doing with the database when you're retrieving data from all these things.
And so SQL.
In the past there have been multiple languages for accessing databases.
There have been many of them over time, and they have various strengths and weakness and stuff.
Mostly they're gone.
Instead, we have sequel.
Sequels the language or SQL.
So I'm kind of going back and forth between pronunciations.
And so.
When the web came along.
They needed to do this sort of things, that these old businesses, these old mainframes, were doing.
But now do it cause.
In effect. Before there are web servers.
There were mainframes.
That we're dealing with lots of people asking for data all the time manipulating it. Now, what they are doing. That's what web applications do.
So it makes sense. They use a technology that was developed for that older thing.
To be used today.
So what's I think? 3,005.
So we have an entire course.
On databases.
So.
You're gonna learn all about the theory of databases and how you optimize them. And all those things like that.
That's well outside the.
Purview of this course.
But understand, why do you care about databases?
That's what you're learning here is like.
They're kind of fundamental to much of what we do, because.
It's such a useful technology for building these.
Large concurrent applications that you know that are what modern web applications.
So they're amazing.
So there are many database engines.
Many of you know, like they're all over. So now, in terms of your common user today.
Oracle.
Is the
Big one in the space, you know. Oracle's a multi-billion dollar corporation.
What is their business making databases and database applications? Now, oracle databases.
Have their own programming languages.
For their databases, and
Businesses are built on top of it.
And that's why they're not going anywhere, because.
Those databases have to keep running in. Oracle can charge those people whatever they want to keep those.
Things maintained so oracle's there.
Then there's a.
Ibm, dB, 2, I think, is Ibm's thing. There's
Microsoft.
What's my this? Ms SQL, but what was
Microsoft, SQL. Server. I think.
You know, so like these are these big commercial ones.
That are used for a lot of things. But open source databases.
Have become very.
Powerful, and are very widely used. Oh, now, if you also, if you now go to
The names of the cloud. dB, so like these are all on-prem.
Databases. And now, of course, there's all the cloud ones.
Azure is much bigger than just I mean, yeah.
Amazon.
We'll say, Aws, azure.
What is the acronym for Google cloud.
So there's many other clouds the big providers have their own. These are all on-prem ones.
But then there's the open source ones which kind of make more sense for a class like this. Initially enough, a lot of the cloud offerings are built on these technologies.
My SQL.
So these are Mario dB. Mysql are basically they're they're originally with the same database. Mysql was bought by Oracle.
And then people got annoyed without oracle, was taken care of, and so they forked it and made Mario dB. And their.
I think there's
There was an old one of the pioneering.
Relational database was a system called ingress.
And postgres, I believe, is a direct descendant of ingress.
Just made it open source. So.
And Postgres has become.
So postgres is important, not just as an implementation of it, because.
Turns out there's all these kind of things beyond the sequel standard that you think you want to do.
And postgress syntax is actually the thing that's adopted by a lot of these.
Cloud databases for the further features, because, you know, postres kind of the fullest implementation.
That's commonly available. It's very reliable, correct, and.
So they can actually take postgres code and incorporate into their systems.
Provide a consistent interface.
And then.
There's a.
Let me ask you this.
To sqlite is not like. So I'm gonna say, sqlite.
Oh, actually sorry! Sqlite!
That's what I should say like, because that's what the.
Creator of it.
Calls it sqlite is also valid. He actually said he doesn't care how you pronounce it.
So I'm probably gonna use multiple pronunciations. And it's very annoying. It's a very kind of name. But.
Anyway. We are out of time we'll start with it. But I'll just say.
It's an.
Process.
And that's what we'll be using in class. And I will start talking about that on Thursday, and we start talking about dB, Demo.
Thank you very much, everyone. I'll stick around for a couple minutes for questions, otherwise I will see you on Thursday.