In this post, we observe our first database created in our last tutorial and learn the terminology associated with it. See the video below and the notes that follow:
A single row in a database table. (also known as tuple). A record consists of 2 or more fields.
Field
A single item of data in a record. It can be thought of as a column in a table. (also known as an attribute)
Data type
The type of data that can be saved in a field. The database management system (DBMS) only allows the specified datatype for each field. For example, The DBMS would not allow text data to be saved in a field that has a data type of “Date/Time”.
Primary Key
A field that uniquely identifies each row in a table or entity. It is always present for each row, i.e. It is never allowed to be blank or empty.
Foreign key
This is a field used to store primary key data from another table. This allows for tables to be related.
Key (or Key field)
Either a primary key or foreign key. Primary keys and foreign keys are called keys because they can be used to represent a record in a table.
Composite Key
when two or more keys are combined to form another.
Composite Primary Key
When 2 Keys are combined to form a primary key.
Candidate Key
A key or composite key that can be reasonably assumed to uniquely identify a row in a table.
Terminology With examples and explanation
Record – A single row in a database table. (also known as tuple). A record consists of 2 or more fields. E.g, a single row in our subject table.
Field – A single item of data in a record. It can be thought of as a column in a table . (also known as an attribute) E.g “First Name” in our student Table
Data type – The type of data that is allowed to be saved in a field. The database management system (DBMS) only allows the specified datatype for each field. For example, The DBMS would not allow text data to be saved in a field that has a data type of “Date/Time”.
Primary Key – A field that uniquely identifies each row in a table or entity. It is always present for each row, i.e It is never allowed to be blank or empty. E.g Student ID
Foreign key – This is a field used to store primary key data from another table. This allows for tables to be related. E.g Student ID in our enrolment table.
Key (or Key field) – Either a primary key or foreign key. Primary keys and foreign keys are called keys because they can be used to represent a record in a table. E.g any primary or secondary key found in the database tutorial.
Composite Key – when two or more keys are combined to form another. E.g (Student ID, Subject Code) from our Enrolment Table.
Composite Primary Key – When 2 Keys are combined to form a primary key. For example, in our student table, we could use a students last name, first name and DOB combined to be the primary key for our table .(This is assuming that we never encounter two students with the same names and date of birth!)
Candidate Key – A key or composite key that can be reasonably assumed to uniquely identify a row in a table. E.g (First Name, Last Name, DOB) in the student table.
Definition: A database is a collection of related data stored in separate data structures, usually table structures. Data stored in databases contain a minimal amount of duplication.
Alternative Definition: A database is as store of data organized into related tables.
A database purpose is to store and manage information; and to be easily searchable to produce filtered information on the data by querying the database.
Facilities querying the database are provided by the Database Management System (DBMS).
For example, a school’s database can store all information about the school in different tables – Teacher information in a teacher table , Student information in a student table, subject information in a subject table.
Because the tables are related to each other , we can perform queries on the database to find:
The list of subjects for a particular student,
The number of students assigned to a subject,
The list of student assigned to a teacher,
…..etc.
Required reading
Information technology for CSEC , 3rd Edition, Howard Campbell , pages 222 to 225
Database Introduction Tutorial Video from earlier class (Thurs 7th Jan 2021)
The following content and skills were demonstrated in the class:
Hello Students, this post contains a live capture of our class on fillable forms.
Please note:
Not all form controls were demonstrated, the list box and checkbox controls were deliberately left out of the demonstration for your research and learning during homework.
Homework: Information Technology for CSEC 3rd Edition , Howard Campbell – complete the tutorial found from pages 154-157 (this includes all controls that were omitted in class from part 1 above)
Optional exercise – Use google forms to produce a form which captures the information from the tutorial from part 2 above.