Dataset Basics
Dataset Basics
Storing Data
Data is stored in a database, located in the back-end of a website (an inaccessible component that visitors don’t interact with). Database usage can range in complexity, from something as simple as storing a user’s profile picture, to more complex systems that monitor and keep track of years of important financial transactions.
Let’s say you’re building a website to showcase your last vacation - a road trip to visit your favorite national parks. A good use case for a database would be to store memorable moments along the way, and display them on the front-end (the visible part of a website that visitors interact with). Storing this information in one place lets you have more flexibility to organize, edit, and update the information easily, and as often as you like!
Collections
You’re probably wondering “how does the data get into the database?”. This is wherecollectionscome in. Collections are tables of data inside of the built-in database. If you’ve ever used a spreadsheet, you have a basic understanding of how a collection works. Each row represents an item in the collection - a destination on your road trip. And each column represents a field - the title, image, and description for the destination.
Wix Collection Table
In the image below, the Title, Image, and Description from your collection are automatically filled into the element. As you can see, using a database in this manner can significantly speed up development.
Wix Page Element from Collection
Datasets
Once data is stored in a collection, it is ready to be displayed on your site. Wix has a clever way of connecting collection data to the elements on your page by usingdatasets.
Datasets are like imaginary wires between your collection and page elements. Through these wires, data is transferred to and from the elements on your page.
In the road-trip example, a dataset will:
- Make the connection from the collection to the page elements.
- Set the content on the page.
- Set the mode for how visitors will interact with the page elements.
- Sort and filter the destinations you choose to display.
Dataflow Graphic
As you can see, the database is where you store collections. From the collection’s data, you can create a dataset that provides an element with information to display. Datasets are the magic keys to linking your database and your front-end.
Beyond
Using the built-in database, collections, and datasets, you now have an idea of how data can be used on your site. Head on over toWixto see more examples of how you can use these features!
'The Codecademy Team, composed of experienced educators and tech experts, is dedicated to making tech skills accessible to all. We empower learners worldwide with expert-reviewed content that develops and enhances the technical skills needed to advance and succeed in their careers.'
Complete Payment to Unlock Full Guide & Source Code
You are viewing the 30% preview. Join TopCourseAI Pro to unlock the remaining 70% of this article, unblur all code snippets, and gain full access to all 412 technical projects and guides.
Ready to access the complete step-by-step tutorial?
Gain full unhindered access to all 412 technical projects and guides, unblur all source code snippets, and download runnable scripts.
Related Blueprints & Guides
View all 166 →Accessibility on the Platform
Codecademy is committed to providing a high-quality learning experience for all learners. That includes accommodating different usage forms such as auditory, motor, or visual restrictions, limited hardware, or other acce...
Web developmentAffordances, Signifiers, and Clickability
For users on the web, the mouse click is perhaps the most fundamental human-computer interaction. The webbecamethe web partially through the power ofhypertext, or text in one document that links to other documents or res...
Web developmentAuthentication and OAuth
Authenticationis the process used by applications to determine and confirm identities of users. It ensures that the correct content is shown to users. More importantly, it ensures that incorrect content is secured and u...
Ready to build production-grade AI systems?
Enjoyed this guide? Continue exploring our library of 166+ production blueprints, multi-agent swarms, and autonomous agent systems with 100% unblurred, executable source code.