Home
Videos uploaded by user “Caleb Curry”
Database Design 36 - 1NF (First Normal Form of Database Normalization)
 
06:51
First normal form is the first step in database normalization. It has to do with making every column and value atomic. 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: 101822 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: 176108 Caleb Curry
MySQL Tutorial 2 - How Data is Organized and Normalization
 
06:32
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: 64691 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: 73728 Caleb Curry
Java Programming Tutorial 1 - Introduction to Java
 
07:36
Check out Pramp: http://www.calebcurry.com/pramp Need more practice? Get your free trial of Pluralsight for software development training that'll take your dev skills to the next level: http://bit.ly/PluralsightFreeTrial 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~~~~~~~~~~~~~~~ Donate!: http://bit.ly/DonateCTVM2. Artist: ARTISS Title: Tropical Summer http://www.hooksounds.com
Views: 86226 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: 105199 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: 23536 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: 60503 Caleb Curry
SignalR Tutorial 2 - How Does SignalR Work?
 
02:44
SignalR works by implementing four common technologies used to make real time apps: WebSockets, EventSource (Server Sent Events or SSE), Forever Frame, and long polling (AJAX long polling). SignalR is an abstraction, meaning we do not need to know which one it implements or how, it will do all of the work for us. That being said, it will still always try to pick the best technology for the job. 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: 36057 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: 16791 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: 111591 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: 11791 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: 22595 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: 26058 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: 16569 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: 17854 Caleb Curry
SignalR Tutorial 9 - Intro to Server Sent Events (EventSource)
 
01:51
Event source is the second fallback of SignalR if WebSockets do not work. The way event source works is it sends a content type to the client of text/event-stream. This essentially tricks the client into listening for an indefinite amount time. This allows the server to send new data as it becomes available. 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. 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: 15672 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: 22210 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: 6660 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: 35486 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: 18200 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: 9226 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: 119372 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: 26384 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: 317212 Caleb Curry
Database Design 11 - Relationships
 
06:21
Donate!: http://bit.ly/DonateCTVM2. This video will be an introduction to relationships. Database design relationships, to be exact. The three kinds of relationships (logically) are one-to-one, one-to-many, and many-to-many. We will learn that many-to-many relationships cannot be stored within a database correctly. This series will be teaching you how to design each relationship. I will also be giving you the solution to storing many to many relationships (stay tuned). Learn more about relationships here: https://www.calebcurry.com/blogs/database-design/relationships 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: 20063 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: 25075 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: 10460 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: 55139 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: 81711 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: 28028 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: 9091 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: 87011 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: 31212 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: 27562 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: 21575 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: 39908 Caleb Curry
SQL Server 2 - Installing SQL Server 2016
 
03:21
We will be using the free version of SQL Server, called the Developer Edition. To get this, you have to join what is known as Visual Studio Dev Essentials. It is free, and very easy to sign up. You will need a Microsoft account, though. They are releasing a cross platform version of SQL server, so you may be able to go through this series on Linux, or MacOS! https://www.microsoft.com/en-us/sql-server/sql-server-vnext-including-Linux There are three options when it comes to downloading. The free trial evaluation, the developer edition, and the express edition. The developer is the full version for non-production environments. This is the route we are going for this series. If you have to use it for production, I recommend the express edition as it is a very good version for being free. When opening the installer, we selected the basic option. Then we waited about 3 years for the software to download. After the installation is complete, you will be shown a bunch of information about your installation: Take note of this information (especially the instance name and connection string). We are going to need the server=localhost later. In the next video we will discuss SSMS (SQL Server Management Studio). See you then! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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: 7946 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: 11108 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: 15602 Caleb Curry
SQL Server 15 - Composite Key
 
07:57
An interesting thing you can do with primary keys is that you can make a combination of columns the primary key. This is important when more than one column is required to make something unique. In an intermediary table, instead of having an association ID, we can have the combination of two rows as the primary key. This is known as either a compound or composite primary key. In the situation of using natural keys, composite keys are more common. For example, you could have a shopping website that allows multiple people from the same household to use a certain coupon you sent out. In this situation, you could use the address and the person's name as the natural primary key. What is the difference between a primary key and a column that has UNIQUE and NOT NULL constraints? The primary difference has to do with indexing. When you create a primary key, the column will automatically be indexed. This means that working with this data is faster. Now, we haven't talked a ton on indexes, but by default this will create a clustered index. UNIQUE constraints are also indexed by default, but the default index for a UNIQUE constraint is a non-clustered index. Clustered indexes determine how the table is actually stored, while non clustered indexes will make a sorted list that has reference to the data. This is not a life changing difference because these can actually be changed. We will discuss all of the details of indexing in future videos. As a side note, the IDENTITY column is not automatically indexed. How do we reference primary keys? This requires what is known as a foreign key, which we will discuss 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: 13214 Caleb Curry
Database Design 45 - Introduction to Outer Joins
 
06:34
Outer Joins will take all rows from either the left, right, or both tables. This is good for when you want to return all of the rows for only one side of the join, but not the other. For example, you could return every single user, but only return some of the rows of an associated table. Donate!: http://bit.ly/DonateCTVM2. 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: 6737 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: 10528 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: 25450 Caleb Curry
PHP Tutorial 2 - Servers, Clients, and How the Internet Works
 
08:26
This class does not cover much on IP addressing and so forth. This is a VERY basic example of how the internet works and is no way intended to be instruction allowing you to completely understand every aspect of the internet. 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: 26848 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: 19860 Caleb Curry
Oracle SQL Tutorial 21 - How to Create / Drop Indexes
 
03:58
In the last video, we wrote up the SQL to create three tables: CREATE TABLE users( user_id NUMBER, username VARCHAR2(50 CHAR) UNIQUE, CONSTRAINT users_pk PRIMARY KEY (user_id) ); 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 ); CREATE TABLE project_users( project_id NUMBER NOT NULL REFERENCES projects (project_id) ON DELETE CASCADE, user_id NUMBER NOT NULL REFERENCES users (user_id) ON DELETE CASCADE, CONSTRAINT project_users_pk PRIMARY KEY (project_id, user_id) ); I'm going to increase the size of the users table a bit by adding a first and last name column. CREATE TABLE users( user_id NUMBER, username VARCHAR2(50 CHAR) UNIQUE, first_name VARCHAR2(50 CHAR), last_name VARCHAR2 (50 CHAR), CONSTRAINT users_pk PRIMARY KEY (user_id) ); But before we finish this design, we should consider indexing certain columns. What columns should we index? Well, as a reminder, the columns that are indexed by default are columns with the UNIQUE constraint, and those that are labeled as primary keys. Columns that are not indexed but often should be are those labeled as a foreign key. The column that jumps out the most to me is the creator column of the project table. It's the only foreign key that is not part of some index. Let's fix this by creating our first index. The way we do that is with the CREATE INDEX command. CREATE INDEX projects_creator_ix ON projects (creator) What naming convention are we following for the index? We are naming it by the table name, followed by an underscore, followed by the column, followed by an underscore, followed by an ix (for index). In this situation it does not apply, but if our foreign key column is labeled as UNIQUE, we can add the UNIQUE keyword like this: CREATE UNIQUE INDEX projects_creator_ix ON projects (creator) Now if you want to get rid of an INDEX, you can use this command: DROP INDEX projects_creator_ix Now, if we want to select data from the user table and the project table we can do that much faster. That's because the foreign key and column it references are both indexed and those are the columns we would do the join on. We will discuss how to do joins in a future video. So what are some potential problems with this database design? Overall, it is pretty good. With this design though we need to make sure there is no way for someone to update a user's username. In the next video we are going to discuss why. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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: 10449 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: 68587 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: 31751 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: 25564 Caleb Curry