Professional Documents
Culture Documents
2.1 Optimized Logical Design: Achelor S Egree IN Nformatics Ngineering
2.1 Optimized Logical Design: Achelor S Egree IN Nformatics Ngineering
2.1 Optimized Logical Design: Achelor S Egree IN Nformatics Ngineering
1 Introduction
When observing the original design, we can appreciate it has several lacks. First of all, logically it's not optimized, as the general unit is not in bytes. Also, the physical-logical design is far from being the best one, which has a very low density as we will see. Therefore, we should improve it as follows.
BACHELOR'S DEGREE IN INFORMATICS ENGINEERING Academic course: 2012/2013 Course: 2 Subject: Files and Databases
Lab Work 3: Template for Labwork Report
Student: Adrin Gil -100293146 2.2 Optimized physic-logical design Now, starting from the optimized logical design, it should be analyzed the type of data stored in each variable. We will divide this into fixed size variables (College number, DNI, Pager), variable size variables (First name, First surname, Second surname, Name, Description ) and optional variables (Speciality). Departing from this, all variable length variables will have a length mark, the fix length variables which can be optimized analyzing it's data will be also optimized and finally optional variables will have an existence mark. From the fix length variables, the only ones which could be optimized are the ones formed by numbers, that is DNI (8 numbers plus a letter) and Pager. In order to do this, we must see if changing from base 10 to base 256 due to the format (and taking into account the original size), we get a more optimized structure than with the logical design.The operation that should be done is the logarithm base 256 of the worst case in both variables, that is to say: Pager:
DNI:
We can now conclude that for DNI no bytes are saved, while there are 4 bytes saved for page number. The final model is the following: Physician:= ( College_number B(6), first_name_length B(1), First Name B(first_name_length), first_surname_length B(1), First Surname B(first_surname_legth), second_surname_length B(1), Second Surname B(second_surname_length), DNI B(5), Pager B(4),
BACHELOR'S DEGREE IN INFORMATICS ENGINEERING Academic course: 2012/2013 Course: 2 Subject: Files and Databases
Lab Work 3: Template for Labwork Report
Student: Adrin Gil -100293146 exist_speciality B(1), ( name_length B(1), Name B(name_length), description_length B(1) Description B(description_length) )exist_speciality ) second_surname_length Data Element College_number h First Name first_na first_name_length me_lengt h 1 first_surname_length Length 1 4 Max 2 1 Length 1 Size (bytes) Mean Mark Type Size
first_name_lengt 1
Length
second_s second_surname_length urname_ length 5 4 1 1 name_le ngth 1 descripti on_lengt h 3 2 1 1 name_length 1 description_length Length 1 Existence Length 1 1
BACHELOR'S DEGREE IN INFORMATICS ENGINEERING Academic course: 2012/2013 Course: 2 Subject: Files and Databases
Lab Work 3: Template for Labwork Report