Database Ig2
Database Ig2
TECHNOLOGY
IGCSE 2
TOPIC: DATABASE
• RELATIONAL DATABASES:
• Data organized into multiple tables with relationships.
• Suitable for large-scale and complex applications.
• Examples: MySQL, PostgreSQL, oracle database.
FLAT-FILE VS. RELATIONAL DATABASES
Aspect Flat-File Relational
• FOREIGN KEY:
• A field in one table that refers to the primary key in another table.
• Establishes relationships between tables.
• Example: order id in a "products" table referring to order id in an "orders" table.
ADVANTAGES OF FLAT-FILE DATABASES
• Simple to use: easy to create and manage.
• Low cost: requires minimal resources and tools.
• Suitable for small data sets: works well for single-user applications or small datasets.
DISADVANTAGES OF FLAT-FILE DATABASES
• Data redundancy: Repeated data can lead to inefficiency.
• Scalability issues: Difficult to manage large datasets.
• Limited functionality: Lacks advanced querying and reporting capabilities.
ADVANTAGES OF RELATIONAL DATABASES
Steps to import:
• (asterisk): Represents multiple characters (e.g., 'S*' finds 'Smith' & 'Sam’)
• ? (question mark): Represents a single character (e.g., 'Sm?th' finds 'Smith' or 'Smyth’)
• (hash): Represents a single numeric digit
Run-Time Calculation in Queries
•Performing calculations using expressions
•Example: Creating a calculated field (TotalPrice = Quantity * UnitPrice)
•Using built-in functions like SUM, AVG, COUNT
Presenting Data
•Reports: Generate structured summaries of data
•Graphs & charts: Visualize trends and patterns
•Exporting reports to PDF, Excel, or Word
Output Layout