Introduction to Databases
Data vs. Information u Data – a collection of facts made up of text, numbers and dates: Murray /18/86 u Information - the meaning given to data in the way it is interpreted: Mr. Murray is a sales person whose annual salary is $35,000 and whose hire date is July 18, 1986.
What is the ultimate purpose of a database management system? Data Information Knowledge Action Is to transform Data driven decision making
What is a Database? u A structured collection of related data u A filing cabinet, an address book, a telephone directory, a timetable, etc. u Google and your u School Student Information System
Basic Database Concepts u Table –A set of related records Name: Barry Harris College: Medicine Tel: Name: Barry Harris u Field u Record –A collection of data about an individual item –A single item of data common to all records
An Example of a Table Records Fields NameGatorLinkPhoneCollege Graffrgraff Pharmacy Harrisbharris Medicine Ipswichzipswich PHHP
Primary Keys & Foreign Keys NameUserPhoneCollege Graffrgraff Pharmacy Harrisbharris Medicine Ipswichzipswich PHHP To ensure that each record is unique in each table, we can set one field to be a Primary Key field. A Primary Key is a field that that will contain no duplicates and no blank values.
What is a Relational Database Management System (RDMS)? A relational database is a collection of tables from which data can be accessed in many different ways without having to reorganize the database tables. DON’T DUPLICATE DATA – That is, once relationships are created, tables can “talk” to each other. We can link (relate) the tables to find data from many different tables.
Relationships Foreign Keys are keyslink to data in other tables
Input Data with Forms u A friendlier view of the database u Used for data input, menus, display and printing u Can perform calculations and combine fields
Queries u A means of asking questions (querying) of your data u Can look across a number of Tables and other Queries u Can perform Calculations and Combine fields
Introducing Reports u Output of information in a printed report u Allows you to group and summarize datasummarize data u Can perform calculations and combine fields u Cannot edit data u Can make labels
Database Options Consumer u Microsoft Excel u Microsoft Access u FileMaker Pro u MySQL (Open Source) u Postgres (Open Source) Enterprise RDMS u Oracle u IBM/DB2 u MS SQL-server u Sybase u Informix u Lotus Notes u MySQL (Open Source) u Postgres (Open Source)
SQL u Structured Query Language (SQL) is used for relational database “programming.” u SQL is the most commonly used programming language in the world