Lecture №5
Lecture №5
Plan:
1.Bases of database systems: concept, characteristic, architecture. Data models. Normalization.
Integrity constraint on data. Query tuning and their processing. 2.Fundamentals of SQL. Parallel
processing of data and their restoration.
3.Design and development of databases. Technology of programming of ORM. The distributed,
parallel and heterogeneous databases.
Having studied this session, you will be able to get an idea about:
What a database is
What a Database Management System is
Microsoft SQL
Creating a database using SQL
Working with SQL
Network model. The network model tends to store records with links to other records. Each
record in the database can have multiple parents, i.e., the relationships among data elements can
have a many to many relationships. So this model is an expansion to the hierarchical structure,
allowing many-to-many relationships in a tree-like structure that allows multiple parents.
The network model provides greater advantage than the hierarchical model in that it
promotes greater flexibility and data accessibility.
Data Types
Various data types are available, similar to what you know in Java. Here are some you're
likely to use Table 4:
We could alternatively use something called a subquery in place of the list. We'll learn about
subqueries next time.
Between
The between operator is merely a replacement for building an expression in terms of >= and
=< and and. Its general form is as follows:
expression betweenlowandhigh
Consider this example:
select name, length(name)
from courses
where length(name) between 10 and 20;
The above produces the same result as this query:
select name, length(name)
from courses
where length(name) >= 10 and length(name) <= 20;
String Functions
Several functions are provided for working with strings (generally string fields, but also
string constants).
First, though, || is the concatenation operator for strings in Derby.
Here are some functions:
● upper(str) returns str converted to all uppercase
● lower(str) returns str converted to all lowercase
● length(str) returns how many characters are in str
● char(ascii_val) returns the character with ASCII code ascii_val
● locate(str1, str_field) returns the index, starting from 1, where str1 is found in str_field or
0 if it's not. A third argument may be supplied to tell the index where the search will start.
● substr(str, start_pos, length) returns the substring starting at start_pos and of length
characters in str1.
Questions:
1.What makes databases such an essential component of modern life?
2. Can databases be used to predict consumer behavior?
3. What are the basic components of a database?
4. Why are relationships a significant aspect of databases?
5. What’s the difference between flat files and other database models?
6. What is the best software for creating and managing databases?
7. Is it possible to access databases using the Web?
References
1. June J. Parsons and Dan Oja, New Perspectives on Computer Concepts 16th Edition -
Comprehensive, Thomson Course Technology, a division of Thomson Learning, Inc Cambridge,
MA, COPYRIGHT © 2014.
2. Lorenzo Cantoni (University of Lugano, Switzerland) James A. Danowski (University of
Illinois at Chicago, IL, USA) Communication and Technology, 576 pages.
3. Craig Van Slyke Information Communication Technologies: Concepts, Methodologies,
Tools, and Applications (6 Volumes). ISBN13: 9781599049496, 2008, Pages: 4288
4. Utelbaeva A.K.,Utelbaeva A.K. Study guide for lectures on discipline “Computer
science”, Shimkent 2008, 84 pages.