![database design erd table tool database design erd table tool](https://i.stack.imgur.com/nPyoM.gif)
For each book that a user checks out, we have to repeat all of the user data in our table. Wow, that's a lot of information all in one table! There are other issues here as well, such as duplication of data (often referred to as 'redundancy'). To implement some of these requirements we could simply try adding more columns to our users table the resulting table might look a little like this: Our app will be used to manage a library of SQL books and allow users to check out the books and also review them. In reality, the requirements of our application will mean that we need to store a lot more data than that. It stores a name for the user, whether their account is enabled or not, when they last logged in, and an id to identify each user record. NormalizationĪt this point, our users table doesn't need to hold that much data for each user in our system.
DATABASE DESIGN ERD TABLE TOOL HOW TO
In this chapter we'll explore the reasons for having multiple tables in a database, look at how to define relationships between different tables, and outline the different types of table relationships that can exist. The majority of databases you'll work with as a developer will have more than one table, and those tables will be connected together in various ways to form table relationships. Thus far in this book, all the work we've done has been with a single database table.