Client side program Write a program in the language of your choice, to "print*" one order. PHP would be a suitable language, using a command line interface as would C or C++ with the database API (libpq), or python "Now for something completely different", or perl "there is more than one way to do anything". Embedded SQL with C is also an option (we'd have to ask for it to be installed). [See first.pgc for a "simple" example.] It solves a problem with the dash in cs-linux and checks for some null values resulting from a left join. Sample output below. Java is no longer a choice, because the postgresql interface does not do "UNIX socket connections" I am sorry to learn this. By now you have a concept of an "order" consisting of several items. It could be identified by (key) customer and date, or have a unique order number, for example. • Print the information about the customer, and the date, once at the beginning of the output. • Then print a line for each item, including the quantity, [unit price and price for all -- unless you are a charity!] • Finally, print the total amount of the order [or the sum of all items ordered, should you be running a food bank. Yes, you may add apples and oranges!)] *.(Print is to be understood in the C and Java sense of writing to standard output, that't normally the console, but can be redirected.) Security! Not a problem on linux, since Ident authentication is in use. You connect as yourself, I as superuser. If you want to let other students use your application, grant appropriate privileges to individual friends, or group stu. GRANT SELECT ON tablename TO stu; Rules will always work, because queries invoked by the rule use the permissions of the rule owner (you). For example, if a student has permission to insert an order_line, and your rule updates the inventory, the student does not need any permission for inventory. Do not put user= in any of your programs unless you want to prevent me or anyone else from using it.
Client side program Write a program in the language of your choice, to "print*" one order. PHP would be a suitable language, using a command line interface as would C or C++ with the database API (libpq), or python "Now for something completely different", or perl "there is more than one way to do anything". Embedded SQL with C is also an option (we'd have to ask for it to be installed). [See first.pgc for a "simple" example.] It solves a problem with the dash in cs-linux and checks for some null values resulting from a left join. Sample output below. Java is no longer a choice, because the postgresql interface does not do "UNIX socket connections" I am sorry to learn this. By now you have a concept of an "order" consisting of several items. It could be identified by (key) customer and date, or have a unique order number, for example. • Print the information about the customer, and the date, once at the beginning of the output. • Then print a line for each item, including the quantity, [unit price and price for all -- unless you are a charity!] • Finally, print the total amount of the order [or the sum of all items ordered, should you be running a food bank. Yes, you may add apples and oranges!)] *.(Print is to be understood in the C and Java sense of writing to standard output, that't normally the console, but can be redirected.) Security! Not a problem on linux, since Ident authentication is in use. You connect as yourself, I as superuser. If you want to let other students use your application, grant appropriate privileges to individual friends, or group stu. GRANT SELECT ON tablename TO stu; Rules will always work, because queries invoked by the rule use the permissions of the rule owner (you). For example, if a student has permission to insert an order_line, and your rule updates the inventory, the student does not need any permission for inventory. Do not put user= in any of your programs unless you want to prevent me or anyone else from using it.
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 5 images