Posts

Showing posts from January, 2024

CST363: Learning Journal Week 4

5 Key Points from Introductory SQL 1. SQL Syntax: Learned how to write basic SQL queries to retrieve data from databases using SELECT statements. 2. Filtering Data: Explored the WHERE clause to filter data based on specific conditions. 3. Sorting Results: Learned how to sort query results using the ORDER BY clause. 4. Aggregate Functions: Studied aggregate functions like COUNT, SUM, AVG, MIN, and MAX to perform calculations on data. 5. Joins: Understood different types of joins (e.g., INNER JOIN, LEFT JOIN, RIGHT JOIN) to combine data from multiple tables. Questions about databases: 1. What are the best practices for database design to ensure efficiency and scalability? 2. How does indexing work in databases, and when should it be used? 3. What are some common security measures to protect databases from unauthorized access and data breaches?

CST363: Learning Journal Week 3

1.Someone described normalization rule as  "a non-key column depends on the key, the whole key, and nothing but the key, so help me Codd."  Key refers a primary or other candidate key of a table.  If the key has multiple columns, then "whole key" means  all columns together and not just some part of the key.  Explain in your words what 3rd normal form is and why it is important. Third normal form eliminates transitive dependencies in a table. It is important because it reduced redundancy, makes it easier to maintain the database, maintains data integrity. 2.What is an SQL view.  How is it similar to a table? In what ways is it different? A SQL view is a virtual table based on a select query. It is similar to a table in that select statements and operations on joins can be used in it. It is different from tables since they don't store data, don't have indexes, and may not be updatable.

CST363: Learning Journal Week 2

1.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. SELECT e.employee_id, e.employee_name, e.supervisor_id, s.supervisor_name FROM employees e LEFT JOIN supervisors s ON e.supervisor_id = s.supervisor_id; 2.What is your opinion of SQL as a language?  Do you think it is easy to learn and use?  When translating from an English question to SQL, what kinds of questions do you find most challenging? SQL is a powerful and widely used language for managing relational databases. It provides a standardized way to interact with databases, making it easy to retrieve, update, and manipulate data. The language is re...

CST363: Journal 1

Relational database tables and spreadsheets look similar with both having rows and columns.  What are some important differences between the two?          - Data Structure:                Relational Database Table: Organized using a schema, which defines the data types and                relationships between tables. The data is structured and normalized to avoid                                       redundancy.                Spreadsheet: Data is often stored in a flat file format, with each sheet containing its own                set of data. There is typically no enforced schema or relationship between sheets.              ...