Posts

Showing posts from September, 2025

CST363 Week 4

Briefly summarize 5 things what you have learned in the course so far.   I have learned some good database concepts so far!  1. I learned designing and forming tables with appropriate data types. 2. SQL commands like SELECT, INSERT, UPDATE, and DELETE to operate with data.  3. Queries with JOINs connecting tables have been the other thing that I have practiced writing.  4. I have also practiced with constraints of primary and foreign keys that enforce relationships.  5. I have learned about normalization and how it helps in reducing redundancy in turn improving the efficiency of the database. List at least 3 questions you still have about databases. Some questions I still have are: 1. How do large scale companies optimize queries for performance when databases grow very large?  2. What are the best practices for indexing tables without overloading the system?  3. How does database security, such as encryption, work behind the scenes in professiona...

CST363 Week 3

What is an SQL view.  How is it similar to a table? In what ways is it different (think about primary keys,  insert, update, delete operations) ? An SQL view is a stored query, thereby making it a virtual table. Since the view does not hold data, it conducts the search of the data in one or more tables while being asked for. A view shares very similar characteristics as those of a table for example you can run SELECT statements against the view as if the view were a table, and it will display the result set in tabular format. In general, views do not have primary keys or indexes, and they cannot always be used as the targets for direct updates. Meanwhile, a few views are updateable in case they are based on a single table without complex joins and so forth whereas the majority are read-only. Very useful aspects of views are the simplification of queries, it improves readability, and restricting a user's access to either some of the columns or some of the rows without giving th...

CST363 Week 2

SQL has the flexibility to join tables on any column(s) using any predicate (=, >, < ).    Most of the time the join will use equality between a primary and foreign key.   Think of example where joining on something other than keys would be needed.  Write the query both as an English sentence and in SQL.  If you can't think of your own example, search the textbook or internet for an example. An example of where a join does not rely on primary or foreign keys is matching records based on dates instead of IDs. An example would be if I have a table called Sales and a Promotions table as well, I may want to be able to see which sales occurred on the same date as a promotion. The English version of the question would be something like "Show all sales and promotions that occurred on the same date." The SQL form being: Select Sales.sale_id, Sales.sale_date, Promotions.promo_name From Sales Join Promotions On Sales.sale_date = Promotions.promo_date; Aligning ...

CST363Week 1

Relational database tables and spreadsheets look similar with both having rows and columns.  What are some important differences between the two? A spreadsheet is concerned with small amounts of data and calculations done manually, while databases work with massive amounts of data in an efficient manner. An important contrast between databases and spreadsheets is that the databases can enforce relationships between different tables, thus simplifying consistency maintenance. Databases also allow multiple access for various users, while providing a wide array of security features. Due to the work being shared or edited by several people, the chance of errors is high in spreadsheets. Installing and configuration a database and learning how to use it is more complicated that just reading and writing data to a file.  What are some important reasons that makes a database a useful investment of time?  Installing and configuring a database may seem more complicated than saving to...