what is a database? - city university of new yorknatacha/teachspring_12/csc330/... ·...

Post on 30-Jul-2020

10 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

What is a Database?What is a Database?What is a Database?What is a Database?

da·ta·base noun \�dā-tə-�bās, �da- also �dä-\

Definition of DATABASE : a usually large collection of data organized especially for rapid search and retrieval (as by a computer) ( y p )

Components of a DatabaseComponents of a DatabaseComponents of a DatabaseComponents of a Database

Components of a Database include tables containing a variety of data and functions that have to ability to y yaccess and manipulate the data sources.

Advantages of Using Advantages of Using D bD bDatabasesDatabases

It means all of the information is together.

The information can be portable if on a laptop. p p p

The information is easy to access at any time.

I ' il i bl It's more easily retrievable.

Many people can access the same database at the same time.

Improved data security.

Reduced data entry storage and retrieval costs Reduced data entry, storage, and retrieval costs.

Disadvantages of Using Disadvantages of Using D bD bDatabasesDatabases

Database systems are complex, difficult, and time-consuming to design.

Initial training required for all programmers and users.

Suitable hardware and software start up costs Suitable hardware and software start-up costs.

A longer running time for individual applications.

SQL?SQL?SQL?SQL?

SQL stands for Structured/Sequential Query Language and is the international standard for g gdatabase manipulation.

SQL Connection StringSQL Connection StringSQL Connection StringSQL Connection String

The sql connection string consists of specific information about the data source and the means to connect to it. Pre-installed connection drivers code the connection from the program to the data source.

Example of how to connect to a data source using Visual Studios will be provided.

SQL QueriesSQL QueriesSQL QueriesSQL Queries

Pre-Installed Drivers allow executable Queries to be made to the database to add, modify, access and , y,remove data from the data sources. This queries can be implemented in the classes, at the User-End of the Program or directly in the databaseProgram or directly in the database.

Examples of SQL QueriesExamples of SQL QueriesExamples of SQL QueriesExamples of SQL Queries

Insert into Books values (‘1984’,’George Orwell’, ‘Fiction’, 9100001, ‘Secker and Warburg’, ‘7/21/1950’,910, ‘OUT’,NULL, 0.15,21,13.99);, , , , , , );

This executable Query enters a series of information to a database into a table called ‘Books’

Tables in a DatabaseTables in a DatabaseTables in a DatabaseTables in a DatabasePrimary Key

Names of the columns in the database table

Information in a DatabaseInformation in a DatabaseInformation in a DatabaseInformation in a Database

Information in the columns in the database table

Column Title

Table DataTable Data

.NET Framework.NET Framework.NET Framework.NET Framework

The .Net Framework is a platform created by Microsoft as a programming model to ease the p g gbuilding of applications for various purposes.

Components of the Components of the N F kN F k.Net Framework.Net Framework

Common Language Runtime

Base Class Libraries

Development frameworks and technologies

ADO.NETADO.NETADO.NETADO.NET

ADO.Net is a suite of classes that make data access from a variety of sources such as Microsoft SQL y QServer, OLE DB, and XML. ADO.Net allows data to be retrieved, stored and modified from these sources.

This presentation will focus on the SQL Server p Qimplementation of a database application

Database DevelopmentDatabase Development(T Ti T Ti )(T Ti T Ti )(To Tier or not Two Tier)(To Tier or not Two Tier)

Depending on personal programming preference, desired design or encapsulation needs, the g p ,programming of a database can be what is considered Two-Tiered or Multi-Tiered.

TwoTwo--TieredTieredTwoTwo TieredTiered

A Two Tiered programming design connects the database directly to the application for user access. y ppGiving the user direct access to modify or insert stored data. The first tier refers to the user-end portion of the program (The GUI) and the second tier refers to the program (The GUI) and the second tier refers to the database itself.

MultiMulti--TieredTieredMultiMulti TieredTiered

Unlike the Two-Tiered approach to database access, the multi-tiered design for database implementation g psets up the databases in classes and not directly though the User-End interface. This method takes longer to set up but provides better encapsulation and security set-up but provides better encapsulation and security for the databases, only allowing prompted access for the end users.

The multi-tiered approach is commonly used in the business environment where data privacy is crucial.

C# vs. JavaC# vs. JavaC# vs. JavaC# vs. Java

Methods of database access are similar, and when accessing databases using both languages and each g g g glanguage requires:

• Database Drivers

• Database Connections

• SQL Queries

H h i l d However, the syntax to implement and access a database are different for both languages.

Implementing a Database Implementing a Database i JAVAi JAVAusing JAVAusing JAVA

Implementing a Database Implementing a Database U i C#U i C#Using C#Using C#

Database ImplementationDatabase ImplementationDatabase ImplementationDatabase Implementation

*Presentation of the creation of a database application in Visual Studios

References References References References

http://www.microsoft.com/net/

http://msdn.microsoft.com/en-us/library/aa286484.aspx

http://www.w3schools.com/sql/default.asp

http://dictionary.reference.com/browse/database

--FINFINFINFIN

top related