0% found this document useful (0 votes)
3 views

Basic Database Terminologies

The document outlines basic database terminologies, including fields, records, tables, files, views, data types, and keys, essential for understanding relational databases. It explains various data types such as character, integer, real number, boolean, and date/time, along with the roles of primary, candidate, alternate, secondary, and foreign keys in maintaining data integrity and relationships. Overall, it emphasizes the importance of these concepts for effective data organization and management.

Uploaded by

northernshezan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Basic Database Terminologies

The document outlines basic database terminologies, including fields, records, tables, files, views, data types, and keys, essential for understanding relational databases. It explains various data types such as character, integer, real number, boolean, and date/time, along with the roles of primary, candidate, alternate, secondary, and foreign keys in maintaining data integrity and relationships. Overall, it emphasizes the importance of these concepts for effective data organization and management.

Uploaded by

northernshezan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Basic Database Terminologies

SLO # 7.2.1
Understanding Database Management Systems

Here are the basic terms related to a relational database:

1. Field/ Attribute/ Column


2. Record/ Tuple/ Row
3. Table
4. File
5. View
6. Data type
7. Key
Field/Attribute/Column

● A single piece of information or data element within a table.


● Represents a specific characteristic or attribute of the entity represented by the table.
● Examples: Customer ID, Product Name, Order Date

2. Record/Tuple/Row

● A collection of related data fields that represent a single entity or instance in a table.
● Each row contains values for all the fields defined in the table.
● Examples: A customer record, a product record, an order record

3. Table

● A collection of related records or rows that store data in a structured format.


● Represents a specific type of entity or data category.
● Organized into columns (fields) and rows (records).
4. File
● A physical storage unit that holds database objects, including tables, indexes, and views.
● Stores the actual data and metadata of the database.
● Managed by the database management system (DBMS).
5. View
● A virtual table that represents a subset of data from one or more base tables.
● Provides a customized perspective on the underlying data.
● Used for data abstraction and security.
6. Data Type
● A classification that defines the type of data a field can store.
● Examples: Integer, String, Date, Boolean
● Determines the range of values and operations allowed for the data.
7. Key
● A unique identifier for a record or row within a table.
● Used to establish relationships between tables and ensure data integrity.
● Primary Key: Uniquely identifies each record in a table.
● Foreign Key: References a primary key in another table to establish a relationship.
Example:
Conclusion:

● Understanding basic database terminologies is essential for effectively working with


relational databases.
● These terms provide a foundation for understanding database structures, data
manipulation, and relationships between data elements.
Data Types and Keys in Relational
Databases
SLO # 7.2.2 & 7.2.3
Introduction

Imagine a vast library with countless books, each containing


valuable information. To effectively organize and access this
knowledge, we need a structured system. Relational databases serve
this purpose in the digital world, storing and managing vast
amounts of data in an organized manner.
Data Types
Just like different books contain various types of content, relational databases store diverse
types of data. Each data type has specific characteristics and serves a unique purpose.

• Character Data (CHAR, VARCHAR): Stores text or strings of characters, such as names,
addresses, or descriptions.

• Integer Data (INT): Represents whole numbers, like ages, student IDs, or product quantities.

• Real Number Data (REAL): Handles decimal numbers, including prices, measurements, or
scientific data.

• Boolean Data (BOOLEAN): Stores logical values, either true or false, indicating conditions
or decisions.

• Date and Time Data (DATE, TIME, TIMESTAMP): Stores date and time information, such
as birthdates, event timestamps, or order dates.
Keys
In a library, books are categorized and linked using unique identifiers, like ISBNs or catalog numbers.
Similarly, relational databases use keys to identify and connect records within and across tables.

• Primary Key: The unique identifier for each record in a table, ensuring no duplicates exist. It's like a
student's unique ID number.

• Candidate Key: A potential primary key, meaning it can uniquely identify records. There can be multiple
candidate keys in a table, but only one becomes the primary key.

• Alternate Key: A candidate key that is not chosen as the primary key. It still uniquely identifies records
but plays a secondary role.

• Secondary Key: Used for searching and sorting records, like student names or course codes. They may
not be unique but aid in data retrieval.

• Foreign Key: Links a record in one table to a related record in another table. It's like a reference number
connecting a student's enrollment record to their personal information record.
Real-World Examples
• Character Data: Storing student names, book titles, or product descriptions.

• Integer Data: Representing student IDs, product quantities, or order numbers.

• Real Number Data: Handling product prices, scientific measurements, or financial


calculations.

• Boolean Data: Indicating whether a student is enrolled, a product is in stock, or an order is


shipped.

• Date and Time Data: Recording student birthdates, order timestamps, or event schedules.
Key Relationships
• Primary Key: Student ID uniquely identifies each student record.

• Candidate Key: Both student ID and email address could be candidate keys, but only one
becomes the primary key.

• Alternate Key: Email address, if not chosen as the primary key, becomes an alternate key.

• Secondary Key: Student name or course code can be used for searching and sorting
student records.

• Foreign Key: Student ID in an enrollment table links to the student ID in the student
information table.
Conclusion
Relational databases provide a structured way to organize and
manage data. Understanding data types ensures accurate storage and
retrieval of information. Keys play a crucial role in identifying and
connecting records, maintaining data integrity and enabling efficient
access.

You might also like