From the course: Vector Databases in Practice: Deep Dive
Create your own database
- [Instructor] So far, we've been learning by running queries on our pre-populated demo database, but you probably know that there's no substitute for building something yourself. Well, in this section, you'll get to do just that. You'll get to create your own vector database instance, populate it with data, and run queries on it. You can even use it to build a web app with it in the next section. First, let's start with a database creation step. At its core level, deviate is a free open source database software library, but it is packaged and offered through multiple installation or deployment methods to meet different users' needs. For this course, we'll use a cloud-based managed solution called Weaviate Cloud Services. The free tier should be more than good enough for us, so let's do that. This will let us focus on the course and not about managing any hardware or infrastructure concerns, but if you do have another preferred method like running a Kubernetes cluster, please feel free to do so and come back. You'll find the required information in the official documentation. For those of us continuing with WCS, let's go to the address shown below to create our database. If you are watching this later on, what we're doing is to create an account to log in and to create a Weaviate eight instance to use. Even if the interface has changed. These steps should still be generally applicable. You probably don't have an account just yet. You can create one by clicking on this button right here. I do have an account, so I'll just log in here using my email address and password. Once you've logged in, all you need to do to create a new database is to click this create cluster button and follow the prompts. I'll select the Sandbox tier, which is free with a limited lifetime. Now, if you provide a cluster name like my Learning Vector database and click create, you should be good to go. That will spin up a Weaviate eight database server in just a minute or so. Once that's ready, you can click here to see cluster details like the URL and where to find your secret API key for this server. So just like that you've set up your first vector database. Next, let's connect to your own database with a similar connection script to one that you saw earlier. Let's open utils.py again in our code editor. Here, you'll notice this connect to my DB function. You can now set up this function to connect to your own database. To do that, replace the cluster URL with the one that you find on the console like so, and also the API key that you can find here on the console. Lastly, remember to update the open AI API Key, as you did before. Now, if you open up this file and just simply run it, you should see it return true in the console. Excellent, you are now a proud owner of a Vector database. Next, we'll start to work with it by showing you a little bit more about how to interact with it using the Python client before going on to populate it with some actual data.
Contents
-
-
-
-
Create your own database3m 33s
-
Work with Weaviate3m 11s
-
Create an object collection3m 39s
-
Basic data import in Weaviate3m 51s
-
Establishing relationships with references4m 25s
-
Recap: Building a vector database2m 40s
-
Challenge: Add another object collection2m 14s
-
Solution: Add another object collection5m 4s
-
-
-
-