Implementation of tupledesc and tuple in mit6.830 lab1 / exercise 1

Tupledesc is the schema of tuple, for example, for the table student

id(int)  name(string)  sex(string)
1           xxx         m
2           yyy         f

Then (1, XXX, m) is a tuple, and tupledesc is (ID (int) name (string) sex (string)) .

 

Estimated time: 2 hours

Difficulty: easy

 

Key and difficult points

1. Make clear the data structure of tuple and tupledesc, and implement them with ArrayList

2. Java programming language details

(a) Fast processing of get and set methods

(b) Automatic production of idea with equals and hashcode methods

(c) Some pits in ArrayList

3. Run through all unit tests.

 

 

Read More: