Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
I now want to talk about what a database is, how data is setup inside a database, and how a database ties in with the whole dynamic process on the web. I do have some resources in case you're interested in looking a little further into a database setup. Within the resources page, on my website, the database information is listed under SQL. SQL, and that stands for structured query language.
Within the SQL page on my website, I have a database connections diagram. And what this does is try and assist you in understanding how everything works together. Within this interface, we have all these different pieces in order to create a database driven webpage. So here is the user requesting a page. Here is our web server. This next section is the application server layer and that is the layer where PHP resides.
Now, this particular slide is referencing a Windows ODBC connection for a database request. That is the type of connection that both ASP and ColdFusion use. But the process is exactly the same for PHP in terms of all these different pieces. So we have the client layer, which is the user. Next, we have the web server layer, this application server layer is where PHP resides.
And then we have what I call the communications layer, in this slide it's referred to as ODBC. Because, if you are working in a Windows environment, you use ODBC to make connections. When we're working in the PHP environment, it's not quite so fine-tuned. But the bottom line is, this layer here, is what communicates with the database. We have PHP over here, we have the database over here, and when working in PHP, it has to understand where the database is located.
And what we're going to do is create a connection to the database, we're going to store that connection information within our website, so that PHP on this side has the information always available to find the database on the other side. And when we do that, we're connecting up to MySQL, that's the type of database we're going to be working in. Now, what is a database? A database is simply individual tables of data, and those tables may have relationships between them, so we can pull pieces of one table, and pull out pieces of another table at the same time, and that's referred to as a table join.
So, the data base resides over here. So you can see, there's quite a few languages we're working in within this dynamic environment. So, we need to create SQL, the language of the database in order to pull any information out of the database. So that's what we're going to set up within Dreamweaver. We use Dreamweaver to assist us in making this connection between PHP and the database.
This layer here, this connection layer, information will be stored in a folder that Dreamweaver creates within our site files. That connections folder must be uploaded to your web server in order for these connections, the PHP and the database, to be able to communicate. So that is a database. It's a storage of information. And if you're really interested in learning more about the rules regarding creating a database, there are normalization rules that should be followed when creating a database. And these are three different areas where you can get more information on that process.
So that is a brief description of what a database is and what we need to do is setup PHP, so PHP knows where our database is located.
Get unlimited access to all courses for just $25/month.Become a member
82 Video lessons · 102088 Viewers
61 Video lessons · 88805 Viewers
71 Video lessons · 72620 Viewers
56 Video lessons · 104256 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.