Tuesday, February 12, 2013

Programming course (week 2)

Today's topic: DATABASE


What is database?
-Organized collection of information
-a   repository for information organized in such a way that a computer program can quickly select or retrieve desired pieces of data

Examples:
-code in matric card to store all details about the student (stored in 1 database)
-borrowing books from library (stored how much books you borrowed)
-telephone books
-collection of music
-list of students

Analogy
Database (a rack)---> you can put stuff in & out (like a folder)

*there are many ways to organize a 'cabinet'
-classify files into their types

2 Types of database(how we design the database?): Flat  vs relational
-the way you design database will determine how fast the database runs-->& this leads to normalization
 

1-Microsoft excel-Flat (everything is stored in 1 table)

-repeating information
-slow to retrieve information
-difficult to re-organize info
-increase risk of typos
-no transactions

2-Microsoft access -Relational (break down information into different types-student's info, course info, mahallah info)-each data in each tables should be related to each other (eg: same student ID)

 -Advantages
- organized database
-sorting using tables-->
-summarizing it using reports
-extracting in 

-breaks part into different tables
-relates/connects tables with unique key (different matric numbers)
-prevents duplicate information
-it's efficient and less prone to error
-optimizes the performance-retrieve from 1 specific information-->easy to search-needs less time to retrive information



Normalization
-the process of splitting data across multiple tables to improve overall performance, integrity(repeating) & longevity(the way how we retrieve-take less time)
-split out data into a particular table-->we need relationship to split the tables

Why normalize
 -no need to repeat information(which will takes up unnecessary space)
-data grow exponentially(rapidly)-will affects the storage
-To avoid slow performance
-To avoid inconsistency-which can avoid searches


How to normalize?
-By splitting the data


Objects in database

-it refers to individual components that comprise database
4 basic objects: -->complete database
-tables-to store
-forms-to design the interphase -how you want to design the data
-queries-to retrieve informations from table
-reports

-macros & modules (visual basic)

What is the heart of the database?
-The tables
-The most important object in database

Why?-->

  • we cannot key in data without tables (we cannot report without tables)


What is table?
-a collection of information organized into:

  1. Fields( columns in table)
  2. Records (the rows in the tables)
  3. Data values (the actual information itself)
  4. Data type(auto number, text,number, currency, date/time, yes/no, attachment, hyperlink-via email, memo, lookups)
MICROSOFT ACCESS 2010
Space:
Limit 2GB-the space needed for system objects-should avoid repeating information 
 Numbers of objects in database=32,768
Characters per object name =64
Number of concurrent users=255


Exercise


-view
-insert field names
-specify the data type
-i can edit the caption...




*learning database will helps in understanding programming better... :) 
Extra note
Khalasss~~

No comments:

Post a Comment