Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Science & Engineering 2111 Introduction to Database Systems 1CSE 2111 Introduction to Database Systems.

Similar presentations


Presentation on theme: "Computer Science & Engineering 2111 Introduction to Database Systems 1CSE 2111 Introduction to Database Systems."— Presentation transcript:

1 Computer Science & Engineering 2111 Introduction to Database Systems 1CSE 2111 Introduction to Database Systems

2 Database Terms – Data A collection of numbers and text – 273459368 – Information Meaning derived from the data – SSN: 273-45-9368 CSE 2111 Introduction to Database Systems2

3 What is a database? A large collection of data stored in a well-defined structure – You can think of a database as An electronic filing system A repository for large amounts of information – Example of a paper database Telephone book Examples of computer databases – Ohio State stores student information in a database – Insurance companies store policy holder information in a database – Your employer stores your information in a database CSE 2111 Introduction to Database Systems3

4 Database Software How do I create a database? – Purchase the software We will use MS Access 2010, but there are many database software products – Oracle – Sybase – SQL Server How do I access information in the database? – Purchase a Database Management System (DBMS) A DBMS is a collection of programs that enable you to enter, organize, and select data in a database. – We will use MS Access 2010, but there are many database management softwareproducts CSE 2111 Introduction to Database Systems4

5 The design should be initially created schematically, and then the database should be created using the chosen database software Steps when setting up a Database CSE 2111 Introduction to Database Systems5

6 1. Decide what information you will store in the database Research Papers database First NameCharge Amount Last NameCharge Date AddressPayment Amount CityPayment Type StatePayment Date Zip Code Home Phone This database is a very simplistic one. Most databases you create will be much more complex. CSE 2111 Introduction to Database Systems6

7 2. Create the layout of the database What tables do you need in your database? What is a table? – An entity used to organize information by categories of like information CSE 2111 Introduction to Database Systems7

8 Research Papers Database Tables CSE 2111 Introduction to Database Systems8 Client Stores client information Charges Stores client charges information Payments Stores client payment information PaymentMethod Stores the payment method Credit Card Cash Check

9 2. Create the layout of the database What fields do you need in your database? What is a field? – An attribute (piece of information) of the table/entity. How will you set them up? – Divide Tables into Inseparable Fields Address as 1 field – 17 Main St. New York, New York 10002 Address as 4 fields Street Address - 17 Main St. City - New York State - New York Zip code – 10002 CSE 2111 Introduction to Database Systems9

10 Research Papers Database Table Name: Client Fields:Client ID First Name Last Name Address City State Zip Code Home Phone Table Name: Charges Fields:Client ID Charge Amount Charge Date Table Name: Payments Fields:Client ID Payment Amount Payment Type Payment Date Table Name: PaymentMethod Fields:MethodID MethodType CSE 2111 Introduction to Database Systems10

11 2. Create the layout of the database Fields contain field types/data types and field properties What is a field Type/Data Type? – Defines the type of information that can be stored. i.e. text, numbers, dates, etc. What is a field Property? – Field size – Input Mask – Validity – Default Value CSE 2111 Introduction to Database Systems11

12 Research Papers Database Table Name: Client Field Type/ Data Type Properties Fields:Client IDText5 Characters longPrimary Key First NameText25 Characters long Last NameText50 Characters long AddressText60 Characters long CityText25 Characters long StateText2 Characters longDefault Value Zip CodeText5 Characters long Home PhoneText10 Characters longInput Mask Table Name: Charges Field TypeProperties Fields:Client IDText5 Characters long Charge AmountCurrencyNone Charge DateDateInput Mast Table Name: Payments Field TypeProperties Fields:Client IDText5 Characters long Payment AmountCurrencyNone Payment TypeText2 Characters long Payment DateDateInput Mask Table Name: PaymentMethod Field TypeProperties Fields:MethodIDText2 Characters long MethodTypeText20 Characters long CSE 2111 Introduction to Database Systems12

13 2. Create the layout of the database What will be the primary key for each table? A field, or a collection of fields, whose values uniquely identify each record in a table CSE 2111 Introduction to Database Systems13

14 Research Papers Database Table Name: Client Field Type/ Data Type Properties Fields:Client IDText5 Characters longPrimary Key First NameText25 Characters long Last NameText50 Characters long AddressText60 Characters long CityText25 Characters long StateText2 Characters longDefault Value Zip CodeText5 Characters long Home PhoneText10 Characters longInput Mask Table Name: Charges Field TypeProperties Fields:Client IDText5 Characters long Charge AmountCurrencyNone Charge DateDateInput Mast Table Name: Payments Field TypeProperties Fields:Client IDText5 Characters long Payment AmountCurrencyNone Payment TypeText2 Characters long Payment DateDateInput Mask Table Name: PaymentMethod Field TypeProperties Fields:MethodIDText2 Characters long MethodTypeText20 Characters long CSE 2111 Introduction to Database Systems14


Download ppt "Computer Science & Engineering 2111 Introduction to Database Systems 1CSE 2111 Introduction to Database Systems."

Similar presentations


Ads by Google