Databases, SSL, Structure Diagram
Databases, SSL, Structure Diagram
A database is a structured collection of data that allows people to extract information in a way that meets
their needs. The data can include text, numbers, pictures; anything that can be stored in a computer.
Primary keys
As each record within a table contains data about a single item, person, or event, it is important to be able to
uniquely identify this item. In order to reliably identify an item from the data stored about it in a record there
needs to be a field that uniquely identifies the item. This field is called the primary key.
A field that is a primary key must contain data values that are never repeated in the table.
The primary key can be a field that is already used, provided it is unique, for example the ISBN in the book
table. The PATIENT table would need an extra field for each record as all of the existing fields could
contain repeated data. To create a primary key, we could add a new field to each record, for example a
unique number could be added to each patient’s record.
ORDER BY Field1, Field2 DESC – this specifies a sort in descending or reverse alphabetical
order starting with the first field.
Structure diagrams
Structure diagrams can be used to show top-down design in a diagrammatic form. Structure
diagrams are hierarchical, showing how a computer system solution can be divided into sub-
systems with each level giving a more detailed breakdown.
Draw a structure diagram for cleaning your teeth. If you are brave enough ask another student to try
out the system to see if it works.