Loading presentation...

Present Remotely

Send the link below via email or IM

Copy

Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.

DeleteCancel

Make your likes visible on Facebook?

Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.

No, thanks

Database Sorting

Computer Science
by

Renzo Pacheco

on 25 October 2013

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Database Sorting

Database Sorting
Databases and Computers
When people hear the term "database" they think in computers at the same time. In computer systems databases are used to store large amounts of data in an organized way. Databases allow a faster search of information and easier tasks like modifying, updating, creating or organizing data.
Arrays...Databases
Arrays (in Computer Science) are structures used to store values in different places or indexes, this is concept we have learned with the closest meaning to database. Arrays and databases are structure we use to store and organize data in the way we want, we may say that arrays are "primitive" or "basic" forms of databases.
Renzo Pacheco
Gabriela Mora
Emilio Loroña
Database
A database is a collection of data organized in some way. The data are typically organized to model relevant aspects of reality in a way that supports processes requiring this information. For example, modeling the availability of rooms in hotels in a way that supports finding a hotel with vacancies.
Updating a database
Updating a database is very important. In this way we have the most recent information right to our hands. When we work with updated information, we get better results in the tasks we are performing. Is like in school, new generations or children in lower grades may learn things we never learned, he same thing happens with databases.
Sorting
Sorting is any process of arranging items in some sequence and/or in different sets. Sorting data makes it easier to find, modify and updating a database because you can find quickly the information thanks to its organization. Also in a database you can sort data in categories so you can look for the information you need faster, to modify the information for example you don't need to modify everything because if you know how data is sorted you can make the changes only where it is needed.
PSEUDOCODE
DATA[] = 8,4,10,2,4,7



SIZE = data.length
output SIZE
output "original array"
i=0
TOP=SIZE - 1
UPPER=1
LOWER = UPPER-1
loop while SIZE>i
I=I + 1
output data[I]
loop while TOP>0
TOP=TOP-1
loop while UPPER<=TOP
output TOP + LOWER + UPPER
if DATA[UPPER] greater than DATA[LOWER] then
TEMP=DATA[UPPER]
DATA[UPPER]=DATA[LOWER]
DATA[LOWER]=TEMP
UPPER=UPPER+1
output "sorted array"
loop while i<SIZE
output DATA[I]
I=I+1
Full transcript