Sales Representative and Customer Database Project
This project is a culmination of everything we did in related Junior year, we worked predominantly in SQL a language used for database management. Definitely one of the simpler than most coding programs. Definitely more abstracted than most programs we use. We used a special SQL IDE called MySQL for our SQL work this year. In this project we were told to perform several tasks with a practice real estate database. To complete this assignment I broke it up into its separate tasks (of which there were 10), with SQL your results are typically selected elements or entirely new tables.
I started with the easiest parts, the simple SELECT statements, where the programmer can select parts of a database table based on the column name and form them into a new table with only those columns. The programmer can also limit the data let into the table by the use of WHERE statements. Which could limit the data based on stated conditions like “rep_id = 5”. The parts that were simple like this were parts #3 – #5, which mainly consisted of making a new table by using preexisting columns using FROM statements and limiting the data shown through WHERE statements.
Part #1 and Part #6 of this assignment is unique because of its use of a UNION statement and an ORDER BY statement. UNION statements are used in database management systems to conjoin two SELECT statements to form one table. The ORDER BY statement is used in SQL to order the elements in a table by a certain factor, for instance, if I have a column of customer ID numbers in a table (for simplicity we’ll call this column cust_id). Then I have a SELECT statement that selects some other columns (customer, sales_rep, etc.). Then I ORDER BY cust_id, this means that the rows of the list will be ordered by the cust_id from lowest to highest.


