Database Applications for Managers Spring 2008  BU4040

Home  |  Syllabus  |  Journal  | Project Exam Research  |  Gallery

Journal Monday March 10th, 2008

 

  1. Midterm will be next class Wed March 12th.

  2. We will take t on line

  3. have a user interface

  4. simple database

  5. understand program on chapt.9 the complete database program on page 297, 298, 299,300 there is four functions that need to be discuss.

For today we will discuss Richness of communication Channel:  Databases should have user friendly and informative error messages.   In C++ we frequently error messages that have nothing to do with the actual code problem when the software is compiled.   Database applications should say specifically what is wrong.   If a file is missing the program should say so.

 

 

http://jcmc.indiana.edu/vol1/issue4/morris.html

How can we make database intelligent?

The program on pages 297 - 300 has six versions

1) Use of sequential file

2) Using random access file

3) Using Array

4) Class and Object

5) Using the Web

6) Using another language like Java or PERL.

Array Vs. Sequential File

Array stores data in the RAM versus the Sequential file which stores data on the hard disk.   Array is much faster to use than a sequential file, however anytime the power is turned off on the computer RAM is erased, where sequential files retain the data despite power being turned off.

Some database server software store frequently accessed data in RAM for the fastest retrieval of information.   MS SQL server will store the results of queries to the database in the RAM for a predetermined period of time before clearing the data out to make space for more relevant data.

The image below shows how important feedback is during the software development lifecycle.  Effective communication between developers and end users are extremely important to make sure that your database application meets the needs of the end users and is effective.

Intranet vs. Internet

Intranet is a network within a company/home.  Think of it as a single network where data is exchanged, it is more secure than the Internet as only people with direct access to the network can access the Intranet.

The Internet is a network of networks.  It connects individual networks across wide areas with each other, so that information can be shared across Intranets.

Is Google and Intelligent database?

   Search engines are in fact a type of database themselves.  It requires the search engine to compile data about web pages and other data types for access during database queries.

Jeffrey found the following example of effective communications.

http://alistair.cockburn.us/images/Agileintro030.ppt

Programming languages are not friendly. The frequently won't say hello to you if they see you in the hall.

If computers are Intelligent then databases should be Intelligent also. 

In an attempt to make searching more relevant to the topic being queried a type of searching and logic have been developed called FUZZY SEARCHING and FUZZY LOGIC.

This coding allows a database and the subsequent search program to give weight to individual data members based on the topic being searched.   If someone searched for FIDO, a FUZZY Search Engine would return results not only about the literal word FIDO, but also about Dogs.

IDBS- Intelligent Databases

Steve found the article below.

http://www.akri.org/ai/intdata.htm

Intelligent Databases should be able to ascertain the context of the search term being used.

Computers have not taken the place of human intelligence and the idea that computers could be general problem solvers (GPS) without user intervention was abandoned in the 1970's.

The information below was found below on Wikipedia at http://en.wikipedia.org/wiki/General_Problem_Solver

General Problem Solver (GPS) was a computer program created in 1957 by Herbert Simon and Allen Newell to build a universal problem solver machine. Any formalized symbolic problem can be solved, in principle, by GPS. For instance: theorems proof, geometric problems and chess playing. It was based on Simon and Newell's theoretical work on logic machines. GPS was the first computer program which separated its knowledge of problems from its strategy of how to solve problems. It was implemented in the low-level IPL programming language.

While GPS solved simple problems such as the Towers of Hanoi that could be sufficiently formalized, it could not solve any real-world problems.

The user defined objects and operations that could be done on the objects and GPS generated heuristics by Means-ends analysis in order to solve problems. It focused on the available operations, finding what inputs were acceptable and what outputs were generated. It then created sub goals to get closer and closer to the goal.

Rodrigo found the following article on Fifth Generation Computers.

Fifth Generation Computers

http://pages.cpsc.ucalgary.ca/~gaines/reports/MFIT/OSIT84/index.html

In 1981 the Japanese announced a program of research on a fifth generation of computing systems (FGCS) that will integrate advances in very large scale integration, data base systems, artificial intelligence, and the human computer interface into a new range of computers that are closer to people in their communication and knowledge processing capabilities. The proposal was a shock at first but Western research quickly reoriented to match the Japanese program. This paper considers fifth generation computing from a wide range of perspectives in order to understand the logic behind the program, its chances of success, and its technical and social impact. The need for a consumer market for mass-produced powerful integrated circuits is shown to underlie the Japanese objectives. The project is placed in a historical perspective of work in computer science and related to the preceding generations of computers. The main projects in the Japanese program are summarized and discussed in relation to similar research elsewhere. The social implications of fifth generation developments are discussed and it is suggested that they grow out of society's needs. The role of fifth generation computers in providing a new medium for communication is analyzed. Finally, the basis for a Western response to the Japanese program is summarized.

The fifth generation computer initiative failed to deliver on its promises of the seamless integration of AI, Database and hardware.  The initiative failed because the technology in use at the time was not able to develop the necessary integration of all of the aspects of computing to make a fifth generation machine a reality.

Brandon found a submission for User Interfaces.

http://www.lexjansen.com/pharmasug/2004/datamanagement/dm04.pdf

In order for a database to be friendly it requires an interface that is easy to use for end users.

Encryption

The exchange of data for some other set of values that allows the data to be secured and hidden from being directly read.   Encryption comes in many strengths each more complex than next in hiding the data.  The encryption program below

#include <iostream>
#include <cstdlib>
#include <ctime>
#include <cstring>
#include <string>
#include <cctype>

using namespace std;
void Encrypt(string&);
string Decrypt(string strTarget);

int main() {
//initialize and get the string from the user
string strTarget;
cout << "Enter a string to encrypt: ";
getline(cin,strTarget);
string temp(strTarget);
Encrypt(strTarget);

cout << "Encrypted: " << strTarget << endl;
cout << "Decrypted: " << Decrypt(strTarget) << endl;

return 0;
}

void Encrypt(string &strTarget)
{
int len = strTarget.length();
char a;
string strFinal(strTarget);

for (int i = 0; i <= (len-1); i++)
{
a = strTarget.at(i);
int b = (int)a; //get the ASCII value of 'a'
b += 2; //Mulitply the ASCII value by 2
if (b > 254) { b = 254; }
a = (char)b; //Set the new ASCII value back into the char
strFinal.insert(i , 1, a); //Insert the new Character back into the string
}
string strEncrypted(strFinal, 0, len);
strTarget = strEncrypted;
}

string Decrypt(string strTarget)
{
int len = strTarget.length();
char a;
string strFinal(strTarget);

for (int i = 0; i <= (len-1); i++)
{
a = strTarget.at(i);
int b = (int)a;
b -= 2;

a = (char)b;
strFinal.insert(i, 1, a);
}
string strDecrypted(strFinal, 0, len);
return strDecrypted;
}
 

From the textbook

Pedro gets 2 points for finding this program in the textbook.  The order of the elements (letters) in the array indicate the order of the letters in the alphabet.

Rodrigo gets two points for recognizing the purpose of the array.

#include<iostream>
#include<fstream>
using namespace std;
int main(){
char c;
char key[]={'M','O','Q','S','T','L','N','P','U','X','Z','F','A','G','B','H','C','V','D','E','I','R','Y','J','W','K'};
ifstream fin1("data1.txt",ios::in);
ofstream fout("data2.txt",ios::app);
while(fin1>>c)
fout<<key[c%65];
fout.close();

ifstream fin2("data2.txt",ios::in);
while(fin2>>c)
cout<<key[c%65];
return 0;

}//MAIN

Fastest search