Summary
In this chapter, you’ve taken a whirlwind tour through the DDL “subset” of SQL, yet you’ve hardly scratched the surface. As I noted at the beginning of the chapter, if you look at the scripts provided in the code download, you’ll see that even for this small database, the scripts are complex—certainly more complex than you’ve seen here.
You’ve looked at the basics of DDL, and you’ve seen how to create, modify, and delete databases and tables in both SQL Server and MySQL. You’ve also seen how you can create indexes on tables and relationships between the different tables in the database.
Remember the following points when using DDL:
-
You usually have multiple ways to do the same thing; for example, you looked at two ways to create primary keys on tables. None of the ways to do something is more correct than the others, so choose the one you’re comfortable using.
-
Be extremely careful when deleting things from the database. It’s easy to destroy a table or a database using just a single line of SQL.
You’ve just about finished with your look at databases, and in the next chapter you’ll learn about several topics that will improve how you handle databases. You’ll look at concurrency, caching, transactions, and multiple result sets and see that these more advanced topics can improve the Web sites that you’re building quite dramatically.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2006 Damien Foggon
About this chapter
Cite this chapter
(2006). Modifying the Database Structure. In: Beginning ASP.NET 2.0 Databases. Apress. https://doi.org/10.1007/978-1-4302-0146-5_11
Download citation
DOI: https://doi.org/10.1007/978-1-4302-0146-5_11
Publisher Name: Apress
Print ISBN: 978-1-59059-577-0
Online ISBN: 978-1-4302-0146-5
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books