![]() date / time – you guessed it: dates and times!. ![]() numeric – numbers, in various forms (e.g.Different data typesĪs you’ll see when we create our very own database in just a minute, different pieces of data in a database are of different types. In any case, that little snippet of SQL would say to our database: “please select all of the records from the bills_paid table” the * signifies to select all columns, or pieces of information, for each record. The SQL language is a universal language used among many different types of databases, including ours, MySQL, which also happens to use the SQL name as part of its own. If you’ve been paying close attention, you may remember that the type of database we’ll be using in our app is known as MySQL, which we installed in the previous lesson. The code above is known as SQL, which is the language that can be used to communicate with our database. So, for example, a query to retrieve all of the records for the bills we’ve paid may look something like this: SELECT * FROM bills_paid Well, as you’ll see in just a few minutes, there’s a way to retrieve exactly that sort of information from the database via what’s known as a query.Ī query is command that we can send to our database, which tells it to perform certain operations. Say, for example, you want to view all of the bills that you paid the previous month. Retrieving information from a databaseĪs mentioned before, we also have the ability to retrieve information that has been added to our database. Information is the key, and the database allows us to populate our web app with it. It allows us to bring meaning to everything, providing context for all parts of the app. Without data, and a database, there is no Facebook as we know it.Īs such, the database plays a crucial, integral role in a web app. When you view your news feed, all of those posts, pictures, and updates are being retrieved from a database. When someone fills out their profile- providing information such as their name, age, and location-that’s also stored in a database. When someone “likes” something on Facebook, that is stored in a database. The database will give us the ability to collect, store, manipulate, and display data throughout our web app. ![]() What role will a database play in our web app? Someone can build a web app with as many fancy features as they can imagine, but if there’s no data going into it (or coming out of it), it’s hard to imagine it providing any value at all. That just goes to show what an important role data plays in a web app. Not all that intriguing, right? Would you want to use Facebook if no one else was? Don’t think so. Imagine Facebook as it is now-with all of the same features, functionality, and options-but without anyone actually using it-without anyone providing any data. Without data, a web app doesn’t provide much value. Our records can contain various pieces of information, such as the bill number, amount, and date paid. We can add new records to that table each time a bill is paid, just as we could have added new pieces of paper to our file folder. Say we have a database, and it contains a table named bills_paid.Īlmost always, when giving things names in web development, we use a format that doesn’t contain any spaces, hence the name bills_paid as opposed to something like “Bills Paid”. We can store data in a database in the same exact way. Within that folder, we have records of payments for various bills. So say, for example, we have a filing cabinet, and it contains a folder labeled “Bills Paid”. Tables are comprised of records, or rows, which you can think of as individual documents within one of the file folders, as depicted below. We can add, update, and remove pieces of data from our database, at will.ĭatabases are comprised of tables, which you can think of as file folders. It’s what will help us organize all of our app’s data. You can think of a database as a sophisticated, digital filing cabinet. Just as knowledge is power, information is power, as well. ![]() Sure you can create a really fancy app like Twitter, but without all of its information-in the form of tweets, in Twitter’s case-stored, retrieved, and viewed, it’s really quite useless, if you think about it. One of the key elements to consider when building a web app is the data.ĭata, or information, is what really gives an app power and purpose. This is lesson three of a 10 ten-lesson course, Simple CodeIgniter App, which walks you through the creation of your first PHP web application using the CodeIgniter framework. Designing and Creating a MySQL Database Using phpMyAdminīy Alex Coleman | Build a Simple CodeIgniter App, CodeIgniter, Web App, Web Development
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |