Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Review Doing it all over again


Published on

  • Be the first to comment

  • Be the first to like this

Review Doing it all over again

  1. 1. Review Doing it all over again
  2. 2. What We Covered <ul><li>Database basics and terminology </li></ul><ul><li>Database Design and Normalization </li></ul><ul><li>SQL </li></ul><ul><li>ADO and XML (briefly) </li></ul>
  3. 3. Database Basics <ul><li>A database stores information relevant to some business need </li></ul><ul><li>A Relational database, stores that information in tables that are related to each other by means of certain “Key” fields </li></ul><ul><li>A Relational Database Management System (RDMS) is software that manages relational databases </li></ul>
  4. 4. Some Major RDMSs <ul><li>SQL Server (Microsoft) </li></ul><ul><li>Oracle </li></ul><ul><li>MySql (Open Source) </li></ul><ul><li>DB2 (IBM) </li></ul>
  5. 5. Database Design <ul><li>The Design process is a long and complex </li></ul><ul><ul><li>First you must understand the purpose of the database </li></ul></ul><ul><ul><li>Next gather requirements </li></ul></ul><ul><ul><li>Thirdly identity potential attributes (fields) and entities </li></ul></ul><ul><ul><li>Next define the entities and their attributes </li></ul></ul><ul><ul><li>Next define the relations between the entities </li></ul></ul><ul><ul><li>Finally evaluate the design for normalization </li></ul></ul>
  6. 6. Keys <ul><li>Every table should have a Primary Key </li></ul><ul><li>A primary key uniquely identifies a row. It cannot ever repeat in its own table </li></ul><ul><li>Tables are related by copying a primary key from one table into another table. The primary key in the second table is a “Foreign Key.” It can repeat in the second table as many times as needed </li></ul>
  7. 7. Relations <ul><li>There are three kinds of relations </li></ul><ul><ul><li>One to one (rare) </li></ul></ul><ul><ul><li>One to many (what you want 99% of the time) </li></ul></ul><ul><ul><li>Many to Many (Must always be resolved into a one to many by creating a linking table) </li></ul></ul>
  8. 8. <ul><li>Course and student have a many to many relationship </li></ul><ul><li>Section becomes the linking table which reduces the many to many to two one to many relations </li></ul>
  9. 9. Some Normalization hints <ul><li>Never list several items in one field </li></ul><ul><li>If you find yourself number columns like Track1, track2, etc. , you need a new table </li></ul><ul><li>If anything in a table depends on another field in the table that is not the key, you need another table </li></ul>
  10. 10. Building the Database <ul><li>Building the Database requires knowing the Specific DBMS you are using and its data types and file systems </li></ul>
  11. 11. SQL <ul><li>SQL is the language relational database use for everything they do, including creating database objects, retrieving data, and manipulating data </li></ul>
  12. 12. Basic SQL Examples <ul><li>SELECT * FROM Customer </li></ul><ul><li>UPDATE Customer SET Lastname=“Smith” WHERE CustomerID=345 </li></ul><ul><li>INSERT INTO Customer(Lastname, Phone) VALUES (“Smith”, “2065456677”) </li></ul>
  13. 13. ADO <ul><li>ADO is a set of tools Microsoft created to create applications which connect to databases. </li></ul><ul><li>There are other tools for creating Database applications such as PHP, or Java </li></ul>
  14. 14. XML <ul><li>Xml has become the universal language for transporting data between separate applications </li></ul><ul><li>It is operating system, database and application neutral </li></ul><ul><li>Increasingly Databases are incorporating xml as a native datatype </li></ul>
  15. 15. What Next <ul><li>A deeper sense of SQL (ITC 222) </li></ul><ul><li>ADO Programming (ITC 172, ITC 224) </li></ul><ul><li>Web Database with PHP (ITC 280) </li></ul><ul><li>Database Administration and Development with SQL Server 2005 (ITC 224 and ITC 226) </li></ul>