1. What are the advantages of a declarative language as opposed to a procedural language?
ANSWER: The advantage of declarative programming languages is mainly two-fold. The programs are concise; this makes it easy even for non-programmers to obtain solutions. In the SQL example above, an analyst or business support person can get the desired information. Similarly, laypersons can write acceptable web pages with simple HTML and CSS commands.
The second advantage of the ...view middle of the document...
Such code can be made highly efficient and can incorporate the best ideas from computing. It can take advantage of parallelism
2. What advantages might a procedural language have over a declarative language?
ANSWER: Procedural programming is used for developing simple applications. The languages that use the procedural programming methodology include Pascal and C languages. Some of the benefits of the procedural programming methodology are:
(1) Easy to read program code. (2) Easy maintainable program code as various procedures can be debugged in isolation. (3) Code is more flexible as you can change a specific procedure that gets implemented across the program.
3. Why do you think cross joins are allowed as a legitimate join? What uses can you see for joins?
ANSWER: I think that a cross-join would be optimized in the client library, so that less data was sent over the network, and then merged, so that the app didn't need to glue the data together.
When you include multiple data sources in a query, you use joins to limit the records that you want to see, based on how the data sources are related to each other. You also use joins to combine records from both data sources, so that each pair of records from the sources becomes one record in the query results.