Introduction to Database Management
Lesson Objectives
- explain the concept terms ‘Database’ and ‘Database Management System’
- contrast the strengths of an electronic database to that of a manual database
- list at least three (3) examples of database management systems (database package)
- identify situations where database can be useful
- demonstrate how data/information is received and stored in a database
- list five database objects: table, query, forms and reports
- define the terms: entity, table, record (tuple), field, query, report
- select appropriate data type for various fields
- justify the selection of data types in the database structure
- value the credibility of a database management system after discussing its advantages.
DATABASE NOTES
Database – a collection of related data about an entity. An entity refers to a particular subject such as people, place and thing) on which data is collected. Attributes – Refers to the different category of data you collect. Manual database - a collection of files store in filing cabinets.
Manual Database – a collection of files in a database management system.
Database Management System – a software that handles the storage, retrieval, and updating of data in a computer system.
Database – a collection of related data about an entity. An entity refers to a particular subject such as people, place and thing) on which data is collected. Attributes – Refers to the different category of data you collect. Manual database - a collection of files store in filing cabinets.
Manual Database – a collection of files in a database management system.
Database Management System – a software that handles the storage, retrieval, and updating of data in a computer system.
Situations in which a database can be useful
- The police have details of all known criminals in a database, eg crimes they've committed.
- Schools use a database to store details about their pupils, eg how many days they've been off school sick.
- A hospital will store details of all its patients in a database, eg a history of their health issues.
- The Government uses a database to store records of people's income tax payments.
- A database is used to keep track of all the drivers in Montego Bay who has not paid their driving ticket
The table below shows a comparison between the manual (paper based) and computerized (Electronic) database
DATABASE OBJECTS
Each database can have a number of objects. An object is an option you can select and manipulate (create). Four commonly used objects in a database package include Tables, Queries, Forms and Reports.
A table is the basic unit of a database. It is a collection of related data about a specific subject.
Query - A query is a means of storing and answering questions about information in a database. Let’s say you wish to know all the students who were born in 2010, you could use query to pull this information from the table.
Form – A graphical user interface designed specifically for entering, displaying and search data. Once it goes in the form then the DBMS will store that information in its own table.
Report - A report is a way of displaying the information from a table or query in a customised format.
Each database can have a number of objects. An object is an option you can select and manipulate (create). Four commonly used objects in a database package include Tables, Queries, Forms and Reports.
A table is the basic unit of a database. It is a collection of related data about a specific subject.
Query - A query is a means of storing and answering questions about information in a database. Let’s say you wish to know all the students who were born in 2010, you could use query to pull this information from the table.
Form – A graphical user interface designed specifically for entering, displaying and search data. Once it goes in the form then the DBMS will store that information in its own table.
Report - A report is a way of displaying the information from a table or query in a customised format.
CREATING TABLES
A table is the basic unit of a database. It is a collection of related data about a specific subject. A record (row/tuple) is a group of related fields pertaining to a person, place or thing. For example, all the information about a student (taken from the form) is a record. A field (column) is an area reserved from each piece of individual data. For example, StudentNo. FirstName, Lastname etc. Characters - numbers, letters, symbol or combinations of each. Example, 1203AD@
A table is the basic unit of a database. It is a collection of related data about a specific subject. A record (row/tuple) is a group of related fields pertaining to a person, place or thing. For example, all the information about a student (taken from the form) is a record. A field (column) is an area reserved from each piece of individual data. For example, StudentNo. FirstName, Lastname etc. Characters - numbers, letters, symbol or combinations of each. Example, 1203AD@
Before, you can enter data in a table, you must first determine the following for the table structure.
- Field Name – These are the attributes.This identifies the data stored in a field.
- Field Type or Data Type - This tells the database program what kind of data goes in the field, whether text, numbers or currency.
- Field size – The maximum number of characters a field can contain. The maximum number is 255 characters. Only applicable to text field types.
- Field Description – This describes the purpose of the field
FIELD TYPES (ALSO CALLED DATA TYPES)
PRIMARY KEY
Primary Key – A primary key is a field in the database table that contains data that uniquely identifies a record. Examples include an Identification number for a student. You cannot enter this ID number for another record (student) as the database will not allow you to do it. Hence, a database is often used over a spreadsheet because it ensures that data is correct. A primary key field for a record cannot be null when you are entering data, this means the field cannot be empty.
In the example below, there are three fields in the database table with the ID field set as primary key:
ID FirstName LastName
Jane Black
This example above is incorrect because the primary key field is null. If you proceed to enter data in the fields first without entering data in the primary field, there might be problems if you try to start a new record.
The correct record is shown below:
ID FirstName LastName
1001 Jane Black
A primary key also helps you to find data about a person within your database quickly.
Primary Key – A primary key is a field in the database table that contains data that uniquely identifies a record. Examples include an Identification number for a student. You cannot enter this ID number for another record (student) as the database will not allow you to do it. Hence, a database is often used over a spreadsheet because it ensures that data is correct. A primary key field for a record cannot be null when you are entering data, this means the field cannot be empty.
In the example below, there are three fields in the database table with the ID field set as primary key:
ID FirstName LastName
Jane Black
This example above is incorrect because the primary key field is null. If you proceed to enter data in the fields first without entering data in the primary field, there might be problems if you try to start a new record.
The correct record is shown below:
ID FirstName LastName
1001 Jane Black
A primary key also helps you to find data about a person within your database quickly.
Click the links below to download documents
database_individual_homework.docx | |
File Size: | 14 kb |
File Type: | docx |
database_pair_assignment_2017.docx | |
File Size: | 15 kb |
File Type: | docx |