Home
Videos uploaded by user “Caleb Curry”
C Programming Tutorial 1 - Intro to C
 
05:44
Get the notes: https://www.calebcurry.com/c-programming-notes/ C Programming Crash Course - https://www.learn.calebcurry.com/p/c-programming-crash-course This is your series on C programming and computer science for beginners. If you are completely new to C, this series is for you! What is C? C is an example of a programming language. What is a programming language? Essentially, we as humans want to communicate with a computer to tell it to do something or to compute something for us, but computers don't understand English, they only understand machine code. Machine code is a sequence of ones and zeros that the computer's processor can understand. This allows us to tell the processor to do simple instructions. The problem is that writing software in machine code is very complex and very error prone. A programming language is something humans can understand that can also be understood by computers. The computer doesn't understand the language directly, but what we tell the computer to do in a programming language is translated to something the computer's processor can understand. C is very good programming language to learn. In fact, it was one of the first really well established programming languages and is one of the most popular languages used today. Many other programming languages are based off of the beauty of C. You may have heard of C++, C#, Objective C, Java…These all have similarities with C. Learning C helps you learn how to become a better software developer. When we communicate to a program in C, we essentially create a file where we type all of our commands. The stuff we write in this file is called code, or source code. When you can read C, this code makes sense. But the code cannot be read by the computer, it still has to be translated for the computer to understand. This process of translation is called compiling. How do we compile code? We use a special software known as a compiler. We hand the source code file to the compiler and it outputs the compiled version of the code and stores that in another file. Think of the compiler as the translator between us humans and the computer. So we write code in a file (you can think of it as just a text file), and then we compile this code into what is known as a program, or software. Once we have a program, we can run or execute the program and it will start doing the things we originally asked the computer to do when we were writing our code. This is the very basics. The more you study, the more you will see how beautiful and fun computer science can be. Enjoy this content? Try another series! Pick one and have some fun! 🙂 Learn Javascript - http://bit.ly/JavaScriptPlaylist Learn Java - http://bit.ly/JavaPlaylist Learn C# - http://bit.ly/CSharpTutorialsPlaylist Learn C++ - http://bit.ly/CPlusPlusPlaylist Learn C - http://bit.ly/CTutorialsPlaylist ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support me! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 164471 Caleb Curry
SignalR Tutorial 1 - What is SignalR?
 
05:03
SignalR is an abstraction that allows us to easily create real-time applications over HTTP. SignalR is great because we do not need to have a deep understanding of how it works, rather we let SignalR do all of the hard work. On the backend, we will be using ASP.NET with C#. The client side will be using JavaScript, but SignalR can work with many different client side technologies. Support me! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://Twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 69820 Caleb Curry
Database Design 39 - Indexes (Clustered, Nonclustered, Composite Index)
 
13:28
This video covers the basics of indexes. Indexing is an extremely important step of database design. Without Indexes database queries can take a substantial amount of time and hog system resources. The main two classifications of indexes are clustered and non-clustered indexes. Clustered indexes are usually the primary key and determine how the data is actually stored in the table. These are the fastest and most effective. Non-clustered indexes sort a reference to data that is still fast but doesn't actually determine how the data is structured. The best tip I can give you is to use indexes but don't over use them. Having loads of indexes on columns that are barely ever in a where clause or join can bog down the database. This is because every time the table is updated the index must also be updated! When a database looks through a table for certain where conditions on a column that does not have an index, it does an entire table scan. This is not a good practice for large databases (or even small databases but not as bad). With an index the database will do an index seek and quickly find the data you are looking for. Composite indexes consist of two or more columns within one index. Use these when you plan on using the two columns together for a database query WHERE clause. Learn more about indexes here: https://www.calebcurry.com/blogs/database-design/introduction-to-indexes Donate!: http://bit.ly/DonateCTVM2. Courses for Download: http://www.udemy.com/u/calebcurry/ (Use the coupon code "YouTubeDiscount" without the quotes) Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://Twitter.com/calebCurry Subscribe (it's free!): https://www.youtube.com/channel/UCZUyPT9DkJWmS_DzdOi7RIA?sub_confirmation=1 Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 101327 Caleb Curry
Database Design 38 - 3NF (Third Normal Form of Database Normalization)
 
06:20
3rd normal form deals with removing transitive dependencies, A transitive dependency is when a column depends upon a column that depends upon the primary key. Donate!: http://bit.ly/DonateCTVM2. Please support me on Patreon: http://www.patreon.com/calebcurry. Subscribe to my newsletter by following this link: http://bit.ly/JoinCCNewsletter. You can always reply to the emails to tell me what you think! ------Social Stuff------ More content: http://CalebCurry.com Courses for Download: http://www.udemy.com/u/calebcurry/ (Use the coupon code "YouTubeDiscount" without the quotes) Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://Twitter.com/calebCurry Subscribe (it's free!): https://www.youtube.com/channel/UCZUyPT9DkJWmS_DzdOi7RIA?sub_confirmation=1 Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 58180 Caleb Curry
Machine Learning Tutorial 1 - Intro to Machine Learning and A.I.
 
05:05
Best Machine Learning book: https://amzn.to/2MilWH0 (Fundamentals Of Machine Learning for Predictive Data Analytics). Machine Learning and Predictive Analytics. #MachineLearning Intro to Machine Learning is the first video in this machine learning course. This video explains machine learning vs predictive analytics and how companies are using machine learning platforms and algorithms to develop intelligent software. This online course covers big data analytics stages using machine learning and predictive analytics. Big data and predictive analytics is one of the most popular applications of machine learning and is foundational to getting deeper insights from data. Starting off, this course will cover machine learning algorithms, supervised learning, data planning, data cleaning, data visualization, models, and more. This self paced series is perfect if you are pursuing an online computer science degree, online data science degree, online artificial intelligence degree, or if you just want to get more machine learning experience. Enjoy! Check out the entire series here: https://www.youtube.com/playlist?list=PL_c9BZzLwBRIPaKlO5huuWQdcM3iYqF2w&playnext=1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support me! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 22424 Caleb Curry
Java Programming Tutorial 1 - Introduction to Java
 
07:36
Check out Pramp: http://www.calebcurry.com/pramp Java Crash Course: http://calebcurry.com/java-crash-course Read the blog: http://calebcurry.com/java-blogs Welcome to the first Java tutorial! We are in for a fun ride so buckle up and let's get going! We are going to talk about everything starting from the fundamentals of the language all the way through object oriented programming and more advanced programming concepts. I'm excited, I hope you are too. Instagram: http://instagram.com/CalebCurry Twitter: http://twitter.com/calebCurry Facebook: http://bit.ly/CalebCurryFacebook More content: http://CalebCurry.com Support me! http://www.patreon.com/calebcurry ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ Subscribe to my newsletter: http://eepurl.com/-8qtH Donate!: http://bit.ly/DonateCTVM2. Artist: ARTISS Title: Tropical Summer http://www.hooksounds.com
Views: 43406 Caleb Curry
MongoDB in 18 Minutes - Intro to MongoDB
 
17:42
Intro guide to MongoDB blog - https://www.calebcurry.com/intro-to-mongodb/. This will give you what you need to get started and is a great learning resource :) You may also enjoy JavaScript: http://bit.ly/JavaScriptPlaylist 😊 MongoDB allows a variable data structure and high speed queries because it is a NoSQL Database. MongoDB is a non relational database that is used to store JSON data or JSON-like data. Check out this video to get up to speed on what it means for data to be structured or not structured! Check out the sponsor of this video ClusterControl! http://bit.ly/ClusterControlMongoDB Support me! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 95988 Caleb Curry
SQL Server 12 - Referential Integrity
 
05:15
The concept of referential integrity is protecting relationships in our database. As a reminder, a relationship is when we have a foreign key reference another column. This column is usually the primary key of another table. This is a foreign key connection. If by any chance we establish a database structure where a table references another table, but we don't enforce this any way, the data in the table that is being referenced could be deleted, but the reference would still exist. If this happened, we would be breaking our referential integrity. We protect this by using referential constraints. A referential constraint tells the database that there is a connection between the two columns. This will allow you to configure what happens when the table being referenced gets updated or deleted. Another important thing to protecting referential integrity it to design the database in the correct way. This requires in depth knowledge of different types of relationships. How do you know when you need to put things in separate tables? We discussed all of the relationship possibilities in previous videos. In summary, relationships are not just something we assume… They are objectively defined so that the database knows they exists. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support me! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 10565 Caleb Curry
MySQL Stored Procedure 7 - Intro to Stored Procedures
 
06:25
This video will discuss stored procedures. Stored procedures are one kind of stored routines. The other kind is stored functions. I plan on discussing both in this series, but we are going to start with stored procedures! This topic introduces a new keyword, DELIMITER. A delimiter is the character we use to end a statement. We need to remember to change the DELIMITER when we are working with stored procedures, otherwise MySQL will try to read the commands in our stored procedures and execute them immediately...that is NOT what we want! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support me! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 14865 Caleb Curry
SignalR Tutorial 6 - Intro to AJAX Long Polling
 
04:21
Long Polling (also known as AJAX Long Polling) is a technique used to simulate real time applications. It's super important to understand the uses of AJAX polling. The last video said that AJAX polling is used to simulate real time applications. This is not ALWAYS the case. It is certainly possible to make it do this, though. For example, your email homepage can make an AJAX request every 30 seconds to see if there are any new emails. This is one way AJAX is used. Support me! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://Twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 21306 Caleb Curry
Oracle SQL Tutorial 14 - Column-Level and Table-Level Constraints
 
04:15
In the previous video we talked about adding constraints at the column-level. We made it nice and simple by only requiring a few keywords, but the problem we were having is that we could not assign a name to the constraint, which many people like to do so we can reference easily if we need to at a later time. To do this, it requires a little bit more typing, but it will give us extra flexibility and many consider it to be the higher quality approach to adding constraints. Let's go though a simple example. Let's say we have a users table with a user_id column that we want to make a primary key. We will create the table like this: CREATE TABLE( user_ id NUMBER PRIMARY KEY ) Instead of adding the PRIMARY KEY keywords after the data type, we add: CONSTRAINT user_pk PRIMARY KEY Now, we have assigned the name user_pk to this constraint. You can do the same with other constraints, such as UNIQUE. The syntax would be CONSTRAINT username_un UNIQUE. The other way to create constraints requires to put all of our constraints at the bottom of our table creation rather than inline with the column. This type of constraint is known as a table-level constraints. To make a column a primary key using table-level constraints, we add it to the CREATE TABLE command as if it is another row and use the CONSTRAINT keyword to tell Oracle that what is coming is a constraint, not a column in our table. CREATE TABLE users( user_id NUMBER, username VARCHAR2(50 CHAR), CONSTRAINT username_un UNIQUE (username), CONSTRAINT users_pk PRIMARY KEY (user_id) ) The primary differences here is that you have to put the column you are talking about in parenthesis after the PRIMARY KEY keyword. That's because it's at the end of the table and you need a way to tell it what column you are talking about. The option of putting it at the end of the table has the added benefit in this situation because if we needed to have a primary key that is the combination of multiple columns, we can do that by just adding the other column in the PRIMARY KEY parenthesis right after a comma. In summary, there are three ways to make constraints. The first is at the column level, unnamed. The second is at the column level, named. The third is at the table level, also named. In the next video we are going to create a named constraint in Oracle SQL Developer, so stay tuned and be sure to subscribe! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support me! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 17331 Caleb Curry
SQL Server 1 -  Intro to SQL Server
 
09:23
There are all kinds of databases in this world. The one we are going to be studying in this series is called Microsoft SQL Server. SQL Server costs money, but there are some free versions available. What is a database? A database is a software that is designed to store a bunch of information, or data. What is data? Anything that is needed to be stored for later use. Usually databases are used for businesses, so data can be analyzed to make business decisions. For example, we can look at sales. When does our data sell the most? How many sales did we get? Who bought our product? What was the price at the time? etc. We can put all of this data together and get a summation as to what sales are like. There are many other uses. For example, websites. Websites store your information so that you can revisit the website at a later day and have your information still there. There are other ways you can store data. For example, spread sheets, CSV, .txt files, cookies and sessions, etc. What is a table? A table is a square with a grid. Columns go from top to bottom, and rows go from left to right. The downsides of a database is that it is more complex, harder to learn, and easy to get yourself in a pickle if you don't know what you are doing. That being said, there are a lot of benefits to using a database. To express the benefits, I am going to compare a database to a spreadsheet. Spreadsheets are all or nothing. You can not easily make a certain column private. Spreadsheets do not easily support multiple people with different roles. Easier to select data, such as just a phone number. Higher security, back up, and recovery options. The amount of information you can store in a database is much more than a spreadsheet. Why SQL Server when there are so many other databases available? You have to know that SQL Server is owned by Microsoft, and therefore this database is often used for applications built using the .NET framework. .NET is the infrastructure that apps are built on. Does it have to be only the .NET framework? No. Hopefully you can see how helpful a database can be. In the next video we are going to learn more about SQL Server. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support me! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 21615 Caleb Curry
MySQL 7 - One-to-One Relationship
 
03:36
This video introduces the concept of designing relationships. Now, when we have data that is somehow related, we have a relationship. There are three kinds of relationships: One-to-one One-to-many Many-to-many We are going to discuss each one of these in a separate video. The focus of this video is one to one relationships. Once again we have to go back to the concept of entities and attributes. An entity is something we store data about and an attribute is the data we store about the entity. This is an example of a relationship. That's because the entity and the attributes are connected in that one depends upon the other. We can describe this relationship by saying it is either one-to-one, one-to-many, or many-to-many. Let's go through an example of a user and an email. A specific user has one username. Is this email going to be used by other people? The chances are no. This email is exclusive to this user. This is a great example of a one-to-one relationship. That's because a user has only one email, and an email is used by only one person. To better understand this, let's compare it to a different attribute. Let's say this is a bidding website and users can post junk to sell. So we will say that the user has an attribute of his auctions. Is this a one to one relationship? Well, the item for sale is posted by only one user, but the chances are that the website will allow the user to post multiple items. In this situation, the relationship is not one-to-one. It is actually a one-to-many relationship, which we will discuss in more detail in the next video. So let's disregard the one-to-many relationships until the next video and let's focus on how to design one-to-one relationships. It's actually very easy. Because an attribute of an entity that is one-to-one exclusively describes that entity, all we have to do to design this relationship is store it as a column in a table designed for this entity. We could have a users table that has a column of username. Problem solved. When you hear one-to-one, think "column in a table." There is one other way to store a one to one relationship. Let's say you have to store the user's image in the database. The image is going to be one-to-one relationship, but you could store it in a table called users_image and reference the user that the image belongs to. That way, we have a separation from the image data and the users data and we only need to use the users_image table when we need images. So in conclusion, there are two ways: A column in a table. A table designated for that attribute that refers directly to the entity using a foreign key. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support me! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 20335 Caleb Curry
Database Design 25 - Surrogate Key and Natural Key
 
07:34
Donate!: http://bit.ly/DonateCTVM2. Surrogate keys are auto incremented numbers that have no real world meaning. Auto incremented means that each row will have the next highest number. Natural keys are keys created from the columns already present within your table. More content: http://CalebCurry.com Courses for Download: http://www.udemy.com/u/calebcurry/ Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://Twitter.com/calebCurry Subscribe (it's free!): http://bit.ly/PqPyvH Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 34243 Caleb Curry
Database Design 12 - One-to-One Relationships
 
03:18
Donate!: http://bit.ly/DonateCTVM2. This video will take the time needed to understand the basics of one-to-one relationships. One-to-one relationships are very easy to understand. Watch this video and this series in its entirety to fully understand designing relationships. More content: http://CalebCurry.com Courses for Download: http://www.udemy.com/u/calebcurry/ Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://Twitter.com/calebCurry Subscribe (it's free!): http://bit.ly/PqPyvH Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 25554 Caleb Curry
Database Design 5 - Naming Conventions
 
03:35
Donate!: http://bit.ly/DonateCTVM2. This video will be explaining what naming conventions are in general and then proceed to explain what naming conventions we will be using. It is important to realize that many relational database management systems have different naming conventions. Because this series is supposed to be able to be used for any RDBMS, my naming convention might not be the best for you. I use the convention that I use for MySQL programming, but I know many other RDBMS will be used for this series. Learn more about naming conventions here: https://www.calebcurry.com/blogs/database-design/beginner-database-terms Courses for Download: http://www.udemy.com/u/calebcurry/ Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://Twitter.com/calebCurry Subscribe (it's free!): http://bit.ly/PqPyvH Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 24123 Caleb Curry
Music Theory Tutorial 125 - Harmonizing The Minor Scale
 
04:03
More content! - http://CalebCurry.com Tech Facebook - http://www.facebook.com/CalebTheVideoMaker Personal Twitter - http://Twitter.com/calebCurry subscribeeeee :) http://bit.ly/PqPyvH Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 9045 Caleb Curry
MySQL 17 - ON DELETE and ON UPDATE
 
04:32
Now, what happens when you have successfully created a reference, and now you try deleting the parent? This is where the ON DELETE clause come in. This is essentially how we configure how strict a foreign key is. There are 3 options you can give for an ON DELETE: RESTRICT / NO ACTION Yes - In MySQL they are the same, but not all DBMS. CASCADE Yes SET NULL Yes Now the default is RESTRICT. This means that when you try to delete a parent row, MySQL is going to throw an error and not let you. Cascade means that if you delete the parent row, any rows that reference that parent will also be deleted. This is pretty dangerous and not often recommended. SET NULL will set the foreign key to be NULL. Now obviously, this is going to require that the foreign key is not labelled NOT NULL. In addition to the ON DELETE clause, there is the ON UPDATE clause. This one is a little less common because it configures what happens when a parent value changes. Obviously, when you are referencing a primary key, the ON UPDATE clause is nearly useless. That's because the primary key value is never supposed to change. If, on the other hand, we have a foreign key referencing a UNIQUE column that is not a primary key, it may change occasionally. So the only times you have to worry about the ON UPDATE clause is with foreign keys referencing UNIQUE columns that are not a primary key, and when you have natural keys that break the rules and actually do change at some point in time. The ON UPDATE clause has the same options as the ON DELETE clause and they all work the same way. Now, the last thing you need to know about foreign keys is that they must match the data type of the column you are referencing. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support me! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 16688 Caleb Curry
Oracle SQL Tutorial 15 - How to Add Primary Key Constraints
 
02:54
The goal of this video is to take the CREATE TABLE statement we have and walk through the different ways to create primary keys. This and foreign keys are the most common constraints, so we need to make sure that you have this one down. Once we have a more complex database design with multiple tables, we will learn the proper way to create foreign keys. For now, I am going to keep all of our constraints at the column level, unnamed. The only exception is the primary key, because that is what we are focusing on in this video. The first way to create the primary key is at the column level, unnamed. The primary key is very important because it what we use to distinguish rows from one another. Every table you create is going to need a primary key, and I suggest putting a lot of effort into making sure your keys are set up correctly and organized. --Delete the table if needed: DROP TABLE users; CREATE TABLE users( user_id NUMBER PRIMARY KEY, username VARCHAR2(50 CHAR) NOT NULL UNIQUE ) The next way is at the column level, but named: --Delete the table: DROP TABLE users; CREATE TABLE users( user_id NUMBER CONSTRAINT users_pk PRIMARY KEY, username VARCHAR2(50 CHAR)NOT NULL UNIQUE ) The general naming convention here is the table name followed by an underscore, followed by pk for primary key. Finally, the third way, which is at the table level, is the way we are going to create our primary key: --Delete the table: DROP TABLE users; CREATE TABLE users( user_id NUMBER, username VARCHAR2(50 CHAR) NOT NULL UNIQUE, CONSTRAINT users_pk PRIMARY KEY (user_id) ) Now, once you've created these constraints, you can use Oracle SQL Developer to find these constraints. Open your databases in the connections tab and find the table in the Tables folder. Double click your table and travel to the Constraints tab. You can tell here that the UNIQUE constraint still exists in this table, but it has a pretty disgusting name. It kind of wants to make me puke. Referencing that constraint in the future with that wacky name would be a burden. Engrave these three options in your head so that you can use any of them whenever you need and can read other peoples' code. Thank you for sticking with the series thus far. In the next video, we will be…doing something. See you then! :) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support me on Patreon! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 17030 Caleb Curry
SignalR Tutorial 5 - Intro to AJAX Polling
 
04:48
There are essentially 2 different ways to get new data asynchronously from a server, AJAX polling, and AJAX long polling. This video will cover AJAX Polling, which is not a technique used by SignalR. Long polling, on the other hand, is used by SignalR, but studying polling helps our understanding of long polling. Please do understand that AJAX polling can be used to simulate real time apps, but this is not the only use of AJAX. AJAX requests are not the best solution AT ALL to make real time apps. They are more designed for asynchronous updating of web pages, such as in the example of form validation. Support me! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://Twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 21573 Caleb Curry
MySQL Tutorial 3 - Relationships
 
04:26
HELP ME! http://www.patreon.com/calebcurry This is a quick intro speaking of relations or relationships. There are basically 3 types: 1 to 1 1 to many many to many or written as 1:1 / one:one 1:many / one:many many:many One to many is where one item relates to one other item. I can have 1 computer and my computer can be only owned by me. 1 to many is where I can own only one computer but my computer can be owned by more than one person:we share. many to many is more like a public computer lab. I can use any computer and any computer can be used by any body. When you have a many to many relationship in a database you want to transform it to two one to many relationships and have what is called an intermediary table. Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 39673 Caleb Curry
MySQL 12 - Referential Integrity
 
03:11
The concept of referential integrity is protecting relationships in our database. As a reminder, a relationship is when we have a foreign key reference another column. This column is usually the primary key of another table. This is a foreign key connection. If by any chance we establish a database structure where a table references another table, but we don't enforce this any way, the data in the table that is being referenced could be deleted, but the reference would still exist. If this happened, we would be breaking our referential integrity. We protect this by using referential constraints. A referential constraint tells the database that there is a connection between the two columns. This will allow you to configure what happens when the table being referenced gets updated or deleted. Another important thing to protecting referential integrity it to design the database in the correct way. This requires in depth knowledge of different types of relationships. How do you know when you need to put things in separate tables? We discussed all of the relationship possibilities in previous videos. In summary, relationships are not just something we assume… They are objectively defined so that the database knows they exists. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support me! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 9680 Caleb Curry
MySQL Tutorial 1 - What is MySQL
 
09:32
MySQL is a programming language used for creating databases. Databases run the back-end of almost every website, business, corporation, school, etc... Watch to learn about database programming with MySQL! HELP ME! http://www.patreon.com/calebcurry Videos Available for Download - http://www.udemy.com/calebthevideomaker2-database-and-mysql-classes/ Playlist - http://www.youtube.com/watch?v=6pbxQQG25Jw&list=PL_c9BZzLwBRKHaa-qY7N-bmZYLPx3RYVB&index=1 What is MySQL? How Data is Organized and Normalization. Relationships Keys Numeric Data Types String Data Types Date and Time Data Types Column Features and Extra Settings Indexes Quotes and Escaping Special Characters Altering Data and More Advanced Queries Joins How to Build a Database How to Install XAMPP and start Using PhpMyAdmin How to Define Your Database Structure Programming Our Database Comments, Semi Colons, Deleting or Dropping Tables How to add Columns and Drop(Delete) Columns How to Insert and Update Data in a Table How to use the Insert and Select Commands How to use the Show Command How to Alter Commands How to be Consistent with MySQL How to use a Where Clause and Select Statements How to use an Oder by Clause How to use a Limit Clause How to Properly Update Columns How to Delete Data Introduction to Character Sets and Collations How to Set Character Sets and Collations How to Search Your database using Like and Wildcards Introduction to MySQL Storage Engines How to Set and Alter Your Storage Engines Comparison Operators Foreign Key Constraints for the InnoDB Storage Engine Introduction to Joins Inner Joins Left Joins How to do an Inner Join and Useful Tips How to do Left Joins (Outer Joins) and Unions Introduction to functions Aliases String Functions Part 1 String Functions Part 2 How to Use Math Operations Numeric Functions Part 1 Numeric Functions Part 2 How to Use Aliases with Your Joins and Functions Date and Time Functions Formatting the Date What is Encryption? How to Encrypt Databases with 1-Way Encryption How to Encrypt Data with 2-Way Encryption Normalizing a Bank System Data types of a Bank System Indexes and Foreign Key Constraints for out Bank System Programming Our Bank system with phpMyAdmin Aggregate Grouping Functions and How They Work Keyword Distinct Group By How to use Aggregate Functions Comparison Functions If Function Case Operator Full Text Search Index In Boolean Mode How to Organize In Boolean Mode Anything else upon request may be considered. This course is design to introduce you to many features of MySQL and teach you what they do. Did you hear that? This course will teach you features of MySQL and teach you what they do. This is to introduce you to advanced SQL but not completely overload you with information. You may or may not come out of this course being able to be a database administrator with a 6 digit income. I guarantee you though, this series will greatly help you understand the power of databasing. Thank you again, please subscribe. I will see you all very soon. -Caleb. Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 314373 Caleb Curry
Oracle SQL Tutorial 19 - ON DELETE (SET NULL and CASCADE)
 
05:59
Welcome everyone! Something you need to consider when you are creating foreign keys is what happens if you delete the parent? As a reminder, the parent is the row that has the value you are referencing in the row that has a foreign key. Why is this something important to consider? It's important because foreign keys need to protect us from two primary things, unacceptable INSERT statements, and unacceptable DELETE statements. Let's see what happens when we try to insert incorrect data into the table with the foreign key: INSERT INTO projects VALUES (1, 'Update website homepage', 'CalebCurry') The response tells us plainly that there is no such user in the users table. So this works correctly. Deleting data on the other hand works a bit differently because the database does not know what you want to do with the child row when you delete the parent from the parent table. By default, we will get an error message that prevents the parent from being deleted, but there are some other options. How do we configure this? This is where the ON DELETE statement comes in. We add the keywords ON DELETE right after the foreign key and then we can give it the option of CASCADE or SET NULL. CASCADE means that if we delete the parent, we are also going to delete the child. In our situation what that means is that if somebody creates a project in our project table and then that persons account gets deleted, all of the projects he owns will also be deleted. CASCADE: CREATE TABLE projects( project_id NUMBER, Project_name VARCHAR2(50 CHAR) UNIQUE, creator VARCHAR2(50 CHAR) NOT NULL, CONSTRAINT projects_pk PRIMARY KEY (project_id), CONSTRAINT projects_users_fk FOREIGN KEY (creator) REFERENCES users (username) ON DELETE CASCADE ) SET NULL will take the value in the child table and get rid of it. What you are left with is NULL. This means that we have an orphaned child. The first thought you might have is that it is a bad thing to have an orphaned child, but in databases that is not always so. In our application if we had it set to SET NULL, when a user account gets deleted the projects would remain in existence they would just lack a creator. This might be a good thing if you are concerned about the long term survival of a project, this might be the route you want to go. It ultimately depends on the application purpose. If you don't like CASCADE or SET NULL, you can leave the entire ON DELETE statement and just have Oracle throw an error when a parent is deleted. As for us, we are going to use ON DELETE CASCADE. We need to use this with extreme caution. If you are not careful, someday you will run a delete a row and that will cascade through you database deleting a bunch of stuff you didn't want to delete. Stuff happens, so make sure you back up your database every once in eternity. Now, in the last video we started with a database design that had three tables. We've only created two in this video. In the next video we are going to create the next one, which is a little special. Then we'll finish things up by adding some indexes. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support me on Patreon! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 18422 Caleb Curry
Database Design 13 - One-to-Many Relationships
 
04:11
Donate!: http://bit.ly/DonateCTVM2. One-to-Many relationships are when one row from tableA can have a relationship with multiple rows of tableB but each row of tableB can only have a relationship with one row from tableA. More content: http://CalebCurry.com Courses for Download: http://www.udemy.com/u/calebcurry/ Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://Twitter.com/calebCurry Subscribe (it's free!): http://bit.ly/PqPyvH Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 26071 Caleb Curry
SignalR Tutorial 8 - Intro to Forever Frame
 
05:06
Forever frame is a way we can create one way persistent connections. This is used by SignalR if Websockets and eventsource both fail. The way it works is it embeds an iframe in our HTML and sets it to receive data from the server. The server can now send data to the client through the iframe. This makes the server push a reality, but it is only a one way connection. Any data sent from the client is sent as a new request. Support me! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://Twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 14762 Caleb Curry
Database Design 37 - 2NF (Second Normal Form of Database Normalization)
 
08:51
Second normal form has to do with removing partial dependencies. A partial dependency is when a column depends on only part of the primary key. This only makes sense if you have a primary key that consists of multiple columns (composite/compound key). Donate!: http://bit.ly/DonateCTVM2. Please support me on Patreon: http://www.patreon.com/calebcurry. Subscribe to my newsletter by following this link: http://bit.ly/JoinCCNewsletter. You can always reply to the emails to tell me what you think! ------Social Stuff------ More content: http://CalebCurry.com Courses for Download: http://www.udemy.com/u/calebcurry/ (Use the coupon code "YouTubeDiscount" without the quotes) Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://Twitter.com/calebCurry Subscribe (it's free!): https://www.youtube.com/channel/UCZUyPT9DkJWmS_DzdOi7RIA?sub_confirmation=1 Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 83510 Caleb Curry
Music Theory Tutorial 2 - Sound
 
05:11
More content! - http://CalebCurry.com Tech/Business Facebook - http://www.facebook.com/CalebTheVideoMaker Personal Twitter - http://Twitter.com/calebCurry subscribeeeee :) http://bit.ly/PqPyvH Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 4791 Caleb Curry
SQL Server 34 - How to Create and Drop Indexes
 
05:15
Creating indexes is a very easy task, but before you go creating indexes on everything, you need to know that some columns are indexed by default. Specifically, any column that is labeled as the PRIMARY KEY or UNIQUE are indexed by default. That means that if you have a UNIQUE column, you do not need to worry about adding an INDEX to it. The columns that you will want to pay special attention to are any foreign keys or columns that you are going to use very frequently. We are going to create an index on our SpeciesID column in our Animals table. This is a foreign key that I'm likely going to use very frequently. CREATE INDEX IX_AnimalsSpecies ON Animals (SpeciesID); The syntax is very similar to CREATE TABLE in that you say CREATE INDEX followed by an index name. The IX_ is a prefix that is sometimes conventionally used to name indexes. Next, we have the table name, and then we have something to describe the column. That way if you see IX_AnimalsSpecies, you automatically know it is talking about an Index for the Animals table that is on the column dealing with the species. To get rid of this index, use this: DROP INDEX IX_AnimalsSpecies; Which is also very similar to how we drop a table. Now, you can also create an INDEX on multiple columns if you are going to use them together very often. The way you do that is just add another column after a comma inside of the () in the index columns. For example: CREATE INDEX IX_AnmialsContact ON Animals (Name, ContactEmail); One other thing I wanted to show you is that you can actually create a UNIQUE Index by adding the keyword in: CREATE UNIQUE INDEX IX_Species ON Species (Species); This should only be used if every value for a column is labeled unique…In fact, it forces every row to be unique. Remember though that if a column is labeled UNIQUE, it is indexed by default...So this is not needed in this situation. In the next video we will discuss in more detail whether you want to use the UNIQUE Constraint create a UNIQUE index. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support me! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 10136 Caleb Curry
PHP Tutorial 1 - What is PHP?
 
09:40
Check out my video Why I Use PHP - https://www.youtube.com/watch?v=O_WF50FQjBU More content! - http://CalebCurry.com Tech/Business Facebook - http://www.facebook.com/CalebTheVideoMaker Personal Twitter - http://Twitter.com/calebCurry subscribeeeee :) http://bit.ly/PqPyvH Notes: PHP stands for PHP Hypertext processor. You can find the manual here: http://php.net/manual/en/index.php PHP is known as a Server Side Scripting Language. This means all of the source code stays on a server and is unavailable to people who do not have access to the server. The only thing clients can get access to is the end result of the program. PHP can be used to develop many systems including user systems and login systems, form validation, database management systems, Content management systems, project management systems, and more! PHP is a great programming language for beginners. In this series, we will be diving into all of the concepts you need to know to start developing with PHP. Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 117353 Caleb Curry
MySQL 18 - Intro to Normalization
 
07:37
Normalization has three steps: 1nf, 2nf, and 3nf. These stand for first normal form, second normal form, and third normal form. Each step has rules on what is allowed or not allowed in our database design. Each normal form gets progressively more strict. When studying normalization, the term dependency will come up. A column depends on the primary key of a table. There are different kinds of dependencies and certain kinds are not allowed. What does normalization do? It helps prevent anomalies. Anomalies are things that are incorrect or unexpected. Think "odd" things. Anomalies happen when we have redundant data. Redundant data is data that is stored in the database more than once. We should try to have as little redundant data as possible. In the upcoming videos we will be designing a bidding website, such as eBay. We will start with incorrectly designed tables and improve the design by going through the normal forms. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support me! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 8259 Caleb Curry
Database Design 21 - Primary Key Index
 
06:28
Donate!: http://bit.ly/DonateCTVM2. Primary key will automatically create an index used for database optimization! More content: http://CalebCurry.com Courses for Download: http://www.udemy.com/u/calebcurry/ Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://Twitter.com/calebCurry Subscribe (it's free!): http://bit.ly/PqPyvH Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 18681 Caleb Curry
Db2 SQL Tutorial 1 - Intro to Db2
 
05:48
Read the Blog: https://www.calebcurry.com/blogs/db2/intro-to-db2 Get Db2: http://bit.ly/FreeDb2 Db2 is a well established relational database that also supports unstructured data. This database is great for developers because there is a free version allowing anyone to try out the database in its entirety. This series is going to introduce you to many of the important database concepts including tables, columns, data types, relationships, and database normalization. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support me! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 28564 Caleb Curry
MySQL 8 - One-to-Many Relationship
 
05:12
A One-to-Many relationship is when one side of the relationship is exclusive, but not the other. An example of this given in the last video was a user on a bidding website. The way this app is set up is that the user can post as many items as he wants, but an individual item listing can only be owned by one user. We could say that the listings are an attribute of the user. The incorrect way to store these is to put everything in one table, the users table. Either we will be storing multiple listings in one column, have unneeded columns, or have duplicate data from unneeded extra rows. As you can see, storing one-to-many data is not as easy as creating a column in a table. This calls for a new table. The listings table! This is going to store the data for the listing and also have a column for the owner. The owner is going to be a foreign key to the users table. When we go through an example of data that is stored in this table, you'll see that we've mitigated all of our previous problems when we were trying to store it in one table. So in conclusion, when you have a one-to-many relationships, you take the many side of the relationship, in this case listings, and create a new table for it. You then create a column that references one individual entity from the one side of the relationship, in this case users. Now an important thing for you to understand is that often the relationships in a database can be decided by either you, or the business rules of the database or the application. So in this situation, we have restricted the listings to being owned by only one user. Does it have to be this way? No. This was a decision by us. We could modify the application to allow a listing to be owned by more than one user. This would be introducing co-ownership to the listings inside of to the application. This is something we will do in the next video, so go watch it! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support me! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 25355 Caleb Curry
PHP Tutorial 3 - How does a Local Server Work?
 
05:54
How does a Local Server work? Find out here! Support me: http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 21162 Caleb Curry
Database Clustering Tutorial 1 - Intro to Database Clustering
 
09:20
Read the Blog: https://www.calebcurry.com/blogs/database-clustering/intro-to-database-clustering Get ClusterControl: http://bit.ly/ClusterControl In this video we are going to be discussing database clustering and how to manage database clusters with ClusterControl. Database clustering is when you have multiple computers working together that are all used to store your data. There are four primary reasons you should consider clustering. Data redundancy, Load balancing (scalability) High availability. Monitoring and Automation That is an intro to a few of the reasons having a cluster is a good idea. Obviously, not everyone needs a cluster. A cluster can be overkill. But the best way to know is to learn more about them, so I’ll see you in the next video! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support me! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 25250 Caleb Curry
SQL Server 4 - Beginner Terms Part 1
 
07:14
In order to be successful as a database developer, you need to speak the right language. I'm not talking about SQL or some programming language, I'm talking terminology. It is important to familiarize yourself with the most common terms as these terms allow us to communicate with other people in our field. Data - The role of a database is to store data. Data is the plural form of the word datum. If we had to define datum, we would say it is an individual fact or piece of information. This means that data is a collection of facts and information. Database - A collection of data. Database Management System (DBMS) - A software that it is capable of storing and interacting with that data. The software is also capable of presenting this data in some way that is user friendly. Even if our data is stored all over the computers secondary memory (SSD or HDD), the database will take the data and present it to us in an organized fashion, such as in a table. SQL Server is an example of a DBMS. In all reality, the distinction between a database and a DBMS is so small that most people use the terms interchangeably. Relational Database Management System (RDBMS) - A relational database is a type of DBMS. This means that all RDBMS are DBMSs, but not all DBMSs are RDBMSs. There are many other types of databases. A relational database presents our data in tables. Relation - This is a fancy pants word that means table. Table - A way to present data that has columns and rows. Columns say what data needs to be inserted and each row will insert data for every column. A database will often have numerous tables. A row can also be called a record. Where a specific column and row intersect is called a field, or a cell. Sometimes, we can fill out all of the information out for a row, but leave certain fields empty. If we do this, the field is said to be null. Null - The absence of a value. Database Design - Because our data is stored in tables, we have to go through an important process known as database design. In order for a database to work the way we intend for it to work, we have to design things. What data should we store, what tables do we create? What columns go in what tables? How are tables related? How do we ensure that our database is up to date? How do we protect our data? All of these questions bring up the concept of data integrity. This is the key term we will start with in the next video. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support me! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 5627 Caleb Curry
Database Design 20 - Introduction to Keys
 
12:55
Donate!: http://bit.ly/DonateCTVM2. Keys are a big thing in database design and programming. Keys keep everything unique and are used to make connections between tables. Watch this video to begin our study of keys! Learn more about keys here: https://www.calebcurry.com/blogs/database-design/introduction-to-keys Courses for Download: http://www.udemy.com/u/calebcurry/ Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://Twitter.com/calebCurry Subscribe (it's free!): http://bit.ly/PqPyvH Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 15873 Caleb Curry
Database Design 1 - What is a Database?
 
08:40
A database is used to store large amounts of data. It differs from a spreadsheet in that it can be manipulated and managed in so many ways. A database will give us security, control, flexibility, and backups for our data. This is the first video in the database design series. I recommend that you watch the video from the series, as it will automatically go to the next video: https://www.youtube.com/watch?v=e7Pr1VgPK4w&list=PL_c9BZzLwBRK0Pc28IdvPQizD2mJlgoID&index=2 Be sure to subscribe so that you receive every new video in your email and on your YouTube homepage. Subscribing is free! Welcome to More content! - http://CalebCurry.com Tech/Business Facebook - http://www.facebook.com/CalebTheVideoMaker Personal Twitter - http://Twitter.com/calebCurry Subscribe for more - http://bit.ly/PqPyvH Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 80133 Caleb Curry
MySQL 24 - Important Data Types
 
05:33
I decided that instead of going through all of the categories of data types real slow, I'm going to give you a video that gives you the most important data types. That way, you can have a pretty good idea of what data types you need to use and when. Also, if any of the info in this video is too fast, you can watch the next videos to get a more in depth understanding. The first data type is CHAR. This data type stores a string that is of a fixed length. You will only want to use this when you know the length of the data for the column. For example, you might have a column for phone numbers. As long as you know that every phone number is going to be the same format, you could use a column with the CHAR data type. You would just specify it as CHAR(length). VARCHAR works in a similar fashion to CHAR, but it works best for variable length data. That means that if you have a column where each row is going to have a different length, you would want to use VARCHAR. For example, if you had a column for an email address, each email is going to be any number of characters. Now, we are going to be going into numeric data types. For each of the numeric data types there are two variations. Signed and unsigned. Signed data types allow for negative values, but the highest value will be lower. Unsigned do not allow negatives but can store higher positive numbers. INT is the data type you use when you need whole numbers. This is likely going to be the data type used for ID columns. DOUBLE is the data type that can be used when you need to store a real number. This means that there can be numbers after a decimal point. There is also a data type called FLOAT. This works similarly but cannot handle as many numbers after the decimal. These data types have the downside in that they often cannot be trusted when doing math. Only use DOUBLES for data where it is acceptable to be pretty close to correct. DECIMAL is a datatype that can be used for numbers where precision is extremely important. For example, Decimal can be used for columns dealing with money, important measurements, or anything where we need the data to work 100% as expected in arithmetic. TIMESTAMP is a column that is used to easily record an instance in time. This is often used to record when row is created or updated. That's because it will automatically generate a value when an INSERT or UPDATE is issued against the database. DATE, DATETIME, and TIME are all used to store dates and times. There are some differences between these and a TIMESTAMP, but I'll just give you one for now to tease you To understand the differences between these and the timestamp, you need to understand something known as UTC time. UTC time is a standard that you can compare against all time zones. It is known as coordinated universal time. So for example, PST is 8 hours behind UTC. The different between TIMESTAMP and these is that TIMESTAMP will convert whatever value to UTC when stored, and convert it back to whatever your time zone is when you retrieve it. This means that if you want to store a date that is going to change to the users time zone when retrieved, use TIMESTAMP. If it needs to stay the same no matter what, use DATETIME. If that's not super clear, we'll try to discuss it in more detail in an upcoming video. The goal of this video was not to teach you the intimate details on defining data types. The goal was to give you a rough over view of the main data types you will find in MySQL. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support me! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 9926 Caleb Curry
MySQL Tutorial 8 - Column Features and Extra Settings
 
07:56
HELP ME! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 16462 Caleb Curry
Database Design 2 - What is a Relational Database?
 
13:02
In this video we talked about a relational database. A relational database is a database that sorts all information in relations. A relation is physically represented by a table. A table will have rows and columns organizing all of our information. Read about Relational Databases here - https://www.calebcurry.com/blogs/database-design/what-is-a-relational-database Tech/Business Facebook - http://www.facebook.com/CalebTheVideoMaker Personal Twitter - http://Twitter.com/calebCurry Subscribe for more - http://bit.ly/PqPyvH Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 66493 Caleb Curry
Database Design 17 - Parent Tables and Child Tables
 
06:58
Donate!: http://bit.ly/DonateCTVM2. Child tables reference a primary key using a foreign key. This helps us design our relationships properly. Later in this series we will learn how the child table inherits values from the parent table and (in some instances) cannot exist without the parent (FK constraints). Learn more about parent-child tables here: https://www.calebcurry.com/blogs/database-design/parent-child-tables More content: http://CalebCurry.com Courses for Download: http://www.udemy.com/u/calebcurry/ Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://Twitter.com/calebCurry Subscribe (it's free!): http://bit.ly/PqPyvH Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 30575 Caleb Curry
MySQL 6 - Beginner Terms Part 3
 
03:54
Foreign key - A foreign key is a column that references another column, usually another primary key. In an upcoming video we will discuss primary and foreign keys in detail so you know more about what is allowed, how to design them, and how to implement them. Relationship - a term used to describe connections between data. Both primary keys and foreign keys are examples of constraints. Constraints - Rules that prevent certain data to be entered into a database. We use constraints to protect our data integrity. For example, we could say that we want every value for a column to be unique, but how do we enforce that? We have to use a constraint. Index - Put simply, an index is something we put on a column, or a group of columns, that improves performance when we SELECT data. We will be learning about all of the details of indexes in upcoming videos. Data types - Every column has to have a data type. This tells the database how to interpret certain data. For example, 2 and '2' are treated differently by the database. You can generally separate data types into 3 categories: string, numeric, and temporal. Now these are categories, so within each category there are specific data types, but we are going to get into all of that in future videos. Data types are important because it allows the database to know how to work with the data. In addition to this, they also work kind of like a constraint in that having data types on columns makes the database reject data that does not match what a column is supposed to be. So if we have a numeric column and try to put in the 'pie', it will not work. As you've probably noticed, a lot of what we have been covering comes back to the concept of integrity. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HELP ME! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 9761 Caleb Curry
MySQL 1 - Intro to MySQL
 
13:14
There are all kinds of databases in this world. The one we are going to be studying in this series is called MySQL. MySQL is free! There are enterprise versions, but we will be using the free and open source version in this series. Now, I've done a MySQL series before, but the series is already many years old. It is still a good series, but I think it is time for a new one. What is a database? A database is a software that is designed to store a bunch of information, or data. What is data? Anything that is needed to be stored for later use. Usually databases are used for businesses, so data can be analyzed to make business decisions. For example, we can look at sales. When does our data sell the most? How many sales did we get? Who bought our product? What was the price at the time? etc. We can put all of this data together and get a summation as to what sales are like. There are many other uses. For example, websites. Websites store your information so that you can revisit the website at a later day and have your information still there. There are other ways you can store data. For example, spread sheets, CSV, .txt files, cookies and sessions, etc. What is a table? A table is a square with a grid. Columns go from top to bottom, and rows go from left to right. The downsides of a database is that it is more complex, harder to learn, and easy to get yourself in a pickle if you don't know what you are doing. That being said, there are a lot of benefits to using a database. To express the benefits, I am going to compare a database to a spreadsheet. Spreadsheets are all or nothing. You can not easily make a certain column private. Spreadsheets do not easily support multiple people with different roles. Easier to select data, such as just a phone number. Higher security, back up, and recovery options. The amount of information you can store in a database is much more than a spreadsheet. Why MySQL when there are so many other databases available? It's supposedely the world's most popular open source database, so there is a ton of community support and questions and answers on the interwebs. In my oppinion, MySQL has a smaller learning curve than most of the other database systems. It is often used for web development, but can be used for small business and up. Againsts Oracle and SQL server, MySQL is usually considered the most "user" level, whereas Oracle is often considered the most "professional / mission-critical". SQL Server is often considered somewhere in the middle. That means for small to medium size projects, MySQL is often chosen. Hopefully you can see how helpful a database can be. In the next video we are going to learn more about MySQL. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HELP ME! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 52878 Caleb Curry
C Programming Tutorial 17 - Vim Basics - Part 1
 
06:51
In this series we have been using Vim. Now, you don't have to use vim if you don't want. That's fine. I too am very new to Vim, I just started using it this year. So I am still a beginner. When I first started using it, I found it to be very annoying, like it made everything more complex than it had to be. If you feel that way, I understand. One you learn some of the commands, you can see that it's not so bad. One of the huge benefits of using vim is that it is so widely available. This means that if you have to connect to another computer through the command line, the chances are you can edit text files on the remote computer using Vim. Cool. Let's open a file in Vim. vim tacos The first thing I want to do with vim is make it not so ugly. The way we can do that is turn syntax highlighting on! :syntax on We can also add a line count: :set number This is great and all but watch what happens when we close and reopen vim. :wq vim tacos You can see that the syntax highlighting and line count goes away. To fix this, we have to edit a file for our vim configuration. So let's quit vim. :q cd vim .vimrc Put this in the file: syntax on set number It's okay if it is a new file. It should still work as long as we are in the home directory, which we are from running cd. The next thing I wanted to discuss is the proper way to move the cursor around in vim. Let me open a small program to show you some commands. So far you've probably used the arrow keys to move your cursor around in vim. This is fine starting out, but a lot of people actually do it a different way. When you use the arrow keys, you often train yourself to stay in insert mode all of the time because you can move around while in insert mode. Well, you are actually not supposed to stay in insert mode but rather are supposed to only be in insert mode when you are about to type. The recommended way to move your cursor around is with h, j, k, l. Give it a try and see if you can get used to it. Now, when you see something that needs changed, you are supposed to move there, then enter into insert mode, and then exit insert mode. Let's give it a try. Now, whether you use the arrow keys or not is ultimately up to you, but either way you will probably want to try to get into the habit of only being in insert mode when you really need to insert something and not all of the time. That's because when you are not in insert mode there are other commands you can run to make coding a lot faster. One of the easiest ways to move around is using G. Type a number followed by G to go to that line. 4G G by itself goes to the very end. $ goes to the end of a line ^ goes to the beginning of a line. a will enter insert mode after the character you are on. w is used to move to the beginning of the next word b is used to move to the beginning of the previous word In the next video we are going to discuss how to copy and paste, undo and redo, and other cool stuff like that. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support me! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 21712 Caleb Curry
Oracle SQL Tutorial 9 - Intro to Queries
 
04:55
This video is for beginners who have never worked with SQL Developer, and we are going to teach how to begin writing queries. So the queries we are going to start with are queries when we give the database an expression and it will return back some kind of value. The most common keyword you are going to need to know for Oracle is SELECT. SELECT is the command we use to get data from the database. Even though we have not really put any data in our database, we can still use the SELECT statement to get data. That's because the database is capable of doing more than just creating tables and retrieving data from tables. So our first goal is to essentially write a Hello World, which just displays the text hello world to us. A good place to start is with: SELECT 'Hello World' This would actually work for many database management systems, but when you run it you will get an error. This actually doesn't work with Oracle, it will tell us we always need the FROM keyword. To get around this, there is a magical table called DUAL. We can put anything we want to SELECT and then say FROM DUAL and it will work. SELECT 'Hello World' FROM DUAL We can also do math: SELECT 1+1 FROM DUAL And we can run even run functions: SELECT SYSTIMESTAMP FROM DUAL To put all of this together, you can grab all of this data at the same time using commas to separate different columns from our generated table: SELECT 'Hello World', 1+1, SYSTIMESTAMP FROM DUAL Support me on Patreon: http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 31667 Caleb Curry
MySQL 9 - Many-to-Many Relationship
 
06:58
In the last video we had an example of a one-to-many relationship for an application that allows users to create listings of items they are auctioning off. A user could post as many listings as he wanted, but a listing could be posted by only one user. This design is slightly limiting though. That's because there is a real possibility that a user could want to share the sale of an item with multiple people. This video is going to discuss that design. Which one is the best design? That is a decision that is either up to you, or whoever gives you the requirements of the database. This gives us more capabilities with the cost of added complexity. So we have users, and we have a listings table. We figured out how to design this as a one-to-one relationship by simply referencing the user in the blogs table. What if we need to reference two users? Well, we have a few options. Let's go through them. The first is to store multiple user_id's in one column. The problem with this is that the data is no longer atomic and we would have to store it as a string. That is a very bad design. The other option is to create a new column for owner_2 This too is a stupid design because if we have only one author we are going to have a ton of NULLs for this column and we are limited to just 2 owners. The other option is to create a new row that has the other owner and repeats the data about the article. This is bad because now we have duplicate data. If you remember the last video, this is the exact same problem we had trying to store the listing inside of the Users table. Why are we having this problem? With a one-to-many relationship it works fine because a listing is associated directly with one user. With a many-to-many relationship we are trying to force the many inside of the table that is designed to be on the one side of a relationship. The way we fix this is with an intermediary table. An intermediary is a table that goes in between the two tables. Essentially we are converting our many-to-many relationship into two one-to-many relationships. Imagine that this inability to store data correctly causes a conflict between these two tables and the intermediary table comes to the rescue to prevent future conflict. We often call this intermediary table a combination of the two tables. We will go with user_listings. By convention I make the first one singular. The columns inside of this table will be two foreign keys. One foreign key will reference the user, and the other will reference the listing. As for the primary key for this table, you can combine both of these columns and say that the combination of these columns has to be unique. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support me! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 22894 Caleb Curry
Oracle SQL Tutorial 12 - Intro to Constraints
 
06:13
As I believe I've mentioned in an earlier video, a constraint is basically a rule we can put in our database that prevents someone from putting the wrong data in. It protects our relationships and data integrity. Because the goal of these constraints are to protect our data integrity, you may hear them called integrity constraints. There are many integrity constraints we are going to talk about: NOT NULL UNIQUE PRIMARY KEY FOREIGN KRY CHECK There is also the DEFAULT attribute. These are all keywords we can add to our columns that will change the way the database works with our data and also prevents incorrect data. NOT NULL is a constraint you can put on a column that prevents nulls. A null is the absence of a value. When we say null, we are saying that every single row has to have a value for this column. UNIQUE is a constraint that makes every row have a unique value for this column. Now note, this does not require values to be put it, and it will allow multiple rows to be null. Next, we are going to talk about primary keys. What qualifies a column as a candidate key? First, not a single row should have a null for that column. Second, every row must be unique. The primary key constraint is essentially a combination of the NOT NULL constraint and the UNIQUE constraint. The foreign key constraint sets the requirement that any value in this column for any row must match a row in another column. Check constraints allow us to be more strict with what data is allowed in our database. NOT NULL and UNIQUE give some level of restriction, but what if we want something more specific? For example, what if we only want values between 0 and 100? That is where check constraints come in. When using check constraints, you give a boolean expression. A boolean expression is something that can be evaluated to true or false. It will only insert the row if the value you try to put into the row makes the expression evaluate to true. So if you put in a value too great or small, the expression will be false and the data is not allowed to be entered. The default constraint is a value you can give a column, and if for any reason when the row is created in the table a value is not provided, the default value will be given. So for example, we could have a bank account table where the balance defaults to 0. How do you actually implement these constraints when you are creating a table? In the next video we are going to be adding these to our users table. Please be sure to subscribe! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support me on Patreon: http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 23945 Caleb Curry
MySQL 31 - DECIMAL Data Type
 
02:20
The DECIMAL data type is similar to the INT data type in that when you use the number for math, it maintains precision. The difference though is obvious in the name. The DECIMAL data type allows for numbers after a decimal point (and before the decimal point). The DECIMAL data type allows us to store what is known as a fixed-point number. A fixed point number is a number that has a specific number of digits available to store numbers in. That means we can't do things like use a DECIMAL data type to store as many digits of PI as possible, because we can't store unlimited digits. We are limited to a certain number. There are two keywords you need to understand when you are working with the DECIMAL data type, precision and scale. Precision is the number of digits and scale is the number of those digits that will come after the radix. You are going to want to provide these numbers when you declare a column of this data type. For example, DECIMAL(5, 2) has a precision of 5 digits and a scale of 2 digits. That means we can store a maximum of two digits after the decimal and four digits total. This gives us a possible range from -999.99 to 999.99 The highest number of digits is 65, and the highest number of digits after the decimal is 30. This data type is also known as DEC, NUMERIC, and FIXED. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support me! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 8836 Caleb Curry

With accurate daylight saving adjustments
Dr ultra troldspejlet minecraft texture
Man vs game bloodborne pathogen
Unlocking big fish games
C program flow control