DATABASE DEVELOPMENT Overview
Definitions A Database is a structured collection of related data (not necessarily electronic) A Relational database is a database structure based on tables linked by common (key) fields. A Database Management System (DBMS) is software for managing one or more databases and providing database functions such as backup and restore SQL is the language relational databases use for all their functions including creating database objects, retrieving, manipulating, inserting data, and for administrative tasks
Definitions Continued A client application is software that uses the database management system for its data manipulation needs XML is a markup language that has become central to the transfer and manipulation of data between applications especially on the web.
Types of Databases Flat files—comma delimited text files or spreadsheet programs like Excel Advantages: easy to understand and use Disadvantages: data redundancy, data integrity issues, difficult to manage as it becomes larger Hierarchical databases—structured like the file system in windows Advantages: fast and easy to navigate Disadvantages: data redundancy, difficulty comparing different sets of data
Relational Databases Relational databases were designed to solve problems in other types of databases Data Redundancy Data integrity Comparison of distinct sets of data The relational database design principles are based on the mathematics of set theory. In a well designed database any piece of data can be related to any other piece of data
Structure of Relational Databases Relational databases consist of tables. Each table represents one distinct aspect of the data. Tables consist of columns and rows. Columns contain the name of the data field Rows contain the actual data Tables are related by means of a common field usually the “key” field of one table repeated in a second table. (much more on this later)
Example DepartmentLocationPhone ACCB HRB EmployeeIDLastnameFirstnameDepartment 20155LarsonSaraHR 90221TownJasonACC 30301ManningPatriciaACC 32002AdamsTomHR
Disadvantages of Relational Databases Relational database structure is complex. It is easy to make a bad database Relational database require a lot of processing and can be slow (Not as much of a problem with modern machines)
DBMSs AccessMicrosoft MySQLMySQL DB2IBM SQL ServerMicrosoft OracleOracle
SQL Everything that can be done in a Relational database can be done in SQL SQL is a 4 th generation language. That means you code what you want to do not how. SELECT LastName, FirstName, Phone, City FROM Customers WHERE City = ‘Seattle’
Client Applications Customers, most managers and business users don’t want to work directly with the DBMS. Client applications are designed to allow users to interact with the data in a more natural and convenient way. Client applications can be written in a variety of languages such as PHP, Java, C++, C#, Visual Basic.Net and many others.
XML Xml is a markup language which has rapidly become important for transferring data between database applications. (as well as for many other purposes) XML is Operating System and Application Neutral. As Text, it is safe and humanly readable Most DBMSs can export data as xml and import xml files into the databases Some DBMSs such as SQL Server can store xml as a native data type
XML Example 1 Jordan Mary 2002 South Mercer Street Seattle WA Danner Thomas 100 Boardwalk South Seattle WA Terrance Sarah 202 Rt 3 Bellevue WA