Presentation is loading. Please wait.

Presentation is loading. Please wait.

UNIVERSITY OF PALESTINE business computer application College of Business Instructor: Mr. Ahmed Abumosameh.

Similar presentations


Presentation on theme: "UNIVERSITY OF PALESTINE business computer application College of Business Instructor: Mr. Ahmed Abumosameh."— Presentation transcript:

1 UNIVERSITY OF PALESTINE business computer application College of Business Instructor: Mr. Ahmed Abumosameh

2 Database Lecture 8

3 Databases A database is a structured collection of data. Simple example is a standard telephone directory or library card index. Electronic databases can store all sorts of information, from phone numbers to music, videos and images. Allow quick searching and are good for keeping historical data, for example weather history.

4 Electronic Databases Electronic databases are generally managed using a program, such as MySQL or Access. These programs are often called databases, but are more accurately referred to as database management systems or DBMS. Integral to the design, development and services offered by websites.

5 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:  Which schools are in a system?  Which students are in which class?  Which classes are filling up? what is a Relational Database Management System (RDMS)?

6 Relationships

7 Entities and Attributes Entities - are specific objects or things in the mini-world that are represented in the database; for example, the EMPLOYEE John Smith, the Research DEPARTMENT, the ProductX PROJECT Attributes are properties used to describe an entity; for example, an EMPLOYEE entity may have a Name, SSN, Address, Sex, BirthDate A specific entity will have a value for each of its attributes; for example, a specific employee entity may have Name=‘John Smith’, SSN=‘123456789’, Address=‘731 Fondren, Houston, TX’, Sex=‘M’, BirthDate=‘09-JAN-55’

8 Table “A table is the primary unit of physical storage for data in a database.” 1 Usually a database contains more than one table.

9 Table

10 A Database with Multiple Tables PublishersBooksCustomers AuthorsInventoryOrders [1]

11 Table Customers

12 Field (Column) a field Customers

13 Record (Row) a record Customers

14 Primary Key primary key field Customers Primary key is a unique identifier of records in a table. Primary key values may be generated manually or automatically.

15 Foreign Key foreign key field primary key field parent table Directors Movies child tablerelationship When tables relate, the primary key of one table becomes a foreign key of the other table

16 Data Types Alphanumeric (Text, Memo) Numeric (Number, Currency, etc.) Date/Time Boolean (Yes/No)

17 Relationship Types One-to-one One-to-many Many-to-many

18 One-to-One  Only one matching record between two tables  This relationship is the least common because it is not a very efficient use of tables

19 One-to-Many Most common type of relationship One record in Table A links to multiple records in Table B  For example: A list of suppliers for the music store is contained in Table A. It is linked by the supplier ID field to Table B which contains all of the products used by the music store.  When Table B is searched for a specific product (record), such as a CD carrying case, the manager can view the supplier’s contact information, which is stored in Table A.

20 Many-to-Many Multiple records in Table A are linked to multiple records in Table B  For example: In the music store database, Table A contains customer information and Table B contains CD inventory. A record for Bob from Table A may be linked to several records of CDs in Table B by linking the Customer ID fields. If Table B contains the CD inventory, a record for a particular CD can be linked to several customers in Table A.

21 Queries A means of asking questions (querying) of your data Can look across a number of Tables and other Queries Can perform Calculations and Combine fields

22 Forms A friendlier view of the database Used for data input, menus, display and printing Can perform Calculations and Combine fields

23 Reports Output of information in a printed report Allows you to group and summarize data Can perform Calculations and Combine fields Cannot Edit Data Can Make Labels

24 Working Together Employees Customers Tables Queries Customer Company Name Address City Telephone Contact Name Forms Reports

25 Design and Document Your Database A designers best tools are a pencil and paper It is important to plan what you are going to do The sooner you touch the computer the sooner you’ll make a mistake If you don’t plan you will often have to start again Document what you are doing, will you remember what you did in three months time?

26 Questions To Ask Yourself What have I got? (Inputs) What do I want? (Outputs) What do I need to do to get there? (Process) How am I going to build it? (Application/Program)

27 Why Use Access? Familiar look and feel of Windows Easy to start building simple databases Can build sophisticated systems It’s already on your computer True relational database


Download ppt "UNIVERSITY OF PALESTINE business computer application College of Business Instructor: Mr. Ahmed Abumosameh."

Similar presentations


Ads by Google