Pt1420 Unit 2 Student Database Answers

Words: 1230
Pages: 5

In the following questions, the “student database” refers to a relational database describing a set of students at a school, including the courses they are taking, the courses they wish to enroll in, all of the courses that the school is offering, and student financial account information. It does not include a transcription service or a record of all grades ever given.It contains enough information for students to enroll in courses, for the Registrar to verify that enrollment,And for the Versar to Bill students her courses and to record payments for courses.
Question one: design a relational database that could be used as the student data described above, including tables, and fields within those tables.
Answer:
1.students table
Studentid(INTEGER)|student
…show more content…
Search by Covering index.
SELECT * FROM Customer WHERE Firstname=”JOHN”
CREATE INDEX details ON Customer(Firstname)
Example2
The covering index has all data the sql should retrieve for a query and it need not go to the original table for the data.For example,if you want to retrieve all the details of the customer create a covering index with all the contact details and the data will be retrieved with less cost.
SELECT Firstname,LastName,Phone,Fax,email FROM Customer
CREATE INDEX details ON Customer(Firstname,LastName,Phone,Fax,email )

Question Ten: what is the purpose of an ORM? Give two advantages of using such a system, and two advantages of not using such a system. How would one make a decision to use or not use such a system in an application?
ORM stands for Object relationship Mapper.It maps relational and object data ie tables with objects.It has objects instead of tables,properties instead of columns and object data instead of row data when compared to a relational database.
Advantages: