Database Management Module Flashcards
What is difference between data and information
Data:
- Raw, unprocessed facts
- Numbers, text, images
Information:
- Processed data that is meaningful
- Game scores, player statistics
What is difference between flat files and relational databases
Flat Files:
- Single table of data
- Simple, but inefficient with large data sets
- Eg. Spreadsheet listing all game players and their scores
Relational Databases:
- Multiple tables linked by relationships
- More efficient & scalable than flat files
- Eg. Tables for players, games, scores, linked by player ID
What is a Relational Database Management System (RDBMS)
Software that uses relational databases to store and manage data
Functions:
- Data storage, retrieval, updating
- Maintaining data integrity & security
What is the role of RDBMS in handling access to data
Access Control:
- Who can access & modify data
- Eg. Only game admins can change high scores
Data Retrieval:
- Efficient querying of data
- Eg. Retrieving top 10 scores from leaderboard
Transaction Management:
- Ensuring data consistency
- Eg. Saving game progress without losing data
What is the independence of data from RDBMS
Data can be modified / moved without changing applications using it
Benefits:
- Flexibility in data management
- Easier upgrades & maintenance
What are entities
Objects / Things in real world with independent existence
Each entity has unique attributes
Eg. Students, Courses, Teachers, in a school database
What are attributes
Properties / Characteristics of entity
Define what data needs to be stored for each entity
Eg. Student entity attributes: StudentID, Name, DoB
What are relationships
Associations between entities
Eg. Relationship between Students, and Courses they enrol in
What are one-to-one relationships
Single record in one table, linked to single record in another table
Has constraints to ensure field in one table corresponds to only one field in another
Eg. Person and their passport
What are one-to-many relationships
Single record in one table, linked to multiple records in another table
Use foreign keys to link related records in different tables
Eg. Single teacher can teach multiple courses
What are many-to-many relationships
Multiple records in one table, linked to multiple records in another table
Use junction table to breakdown many-to-many into two one-to-many relationships
Eg. Students enrolling into multiple courses, each course has multiple students
What are tables
Collection of related data held in structured format within database
Implementation of entities
Has fields (Columns), and records (Rows)
Tables store data for entities
Ensured by primary & foreign keys, constraints
Field (Columns): Define type of data to be stored
- Eg. Student Table with fields; StudentID, Name, DoB, Email
Records (Rows): Each row is data entry for table
What is the hierachical structure of data
1) Field / Attribute:
- Smallest data unit
- Eg. StudentID in student table
2) Record:
- Single, complete set of fields
- Eg. Single student’s details
3) Table / Entity:
- Collection of related records
- Eg. Student table with all student records
4) Database:
- Collection of related tables
- Eg. School database with Students, Courses, Teachers tables
What are the different datatypes in databases
Integer:
- Whole numbers
- Eg. StudentID
Float:
- Decimal numbers
- Eg. GPA
Boolean:
- True / False values
- Eg. Enrollment Status
Text:
- Alphanumeric characters
- Eg. Student Address
Date:
- Date values
- Eg. Date of Birth
Choosing Data Types:
- Ensures data integrity & efficiency
What are primary keys
Uniquely identifies each record in a table
Contains unique values, cannot contain null values
Each record is unique, easily identifiable
Each table has 1 primary key
What are foreign keys
Links records between two tables
Establishes relationship between tables
Ensures referential integrity, foreign key value exists in referenced table