Relational database comes into play when an asset tracking database is needed, and spreadsheets are too large to use for the particular data. After the design of your new database, including the fields, data types, primary keys, and foreign keys, is finished, the next step is to actually go ahead and create the corresponding table for the database. The very first step to create a relational database is to create and name a new database file, which will contain all tables and objects included in the database. Next, using the table structure formed in the “design” phase of the process, each table in the database is created. And finally, once that table structure is complete, the last step is to enter the data into the tables, and relate different tables to each other as needed.
Star schema is one of the simplest database models and is commonly used as a model for relational data warehouses and multidimensional databases. It consists entirely of fact tables and dimension tables. Fact tables are an event or entity such as a sale and a dimension table consists of details about that event such as date, place, speed of delivery, etc. For example, a geography dimension table can be used to describe location data, such as country, state, or city. In a star schema, a fact table is surrounded by numerous dimensions that branch out, creating an image similar to a star. One of the advantages of a star schema model is that it is compatible with Online Analytical Processing (OLAP) which allows for data mining of specific information from different points of view. For example, a user can view the sales from a specific item at any specific time in the past. One of the disadvantages of the star schema model is that it is a simplistic model so it is not capable of creating complex relational analytics. Star schemas are also denormalized so it is possible for redundancies to occur within the database.
Types of Relationships
There are three basic types of relationships among entities. These three types include: one-to-one, one-to-many, and many-to-many. In a one to one relationship every row in one table is linked to one specific row in another table. This means that there must be exactly as many rows in the first table as in the second table. This type of relationship isn’t very common due to the fact that there isn’t always a benefit to the design of a database. There is no benefit to the design because if the data is directly related it would make sense to have all the data in one table. One way that one-to-one relationships could be beneficial is if some of the data is needed, but isn’t used often. The data that isn’t used often could be stored separately, and away from the more important data.
One-to-many relationships allow each row in a table to be related to many rows in another table. This type of relationship is beneficial to a database due to the fact that you can reference frequently used data in many different tables by only entering it into one master table. Usually, the number of rows in the first table would be less than the number of rows in a second, third, forth, and so on, table. One-to-many relationships are often used in libraries. For example, names of authors in one table could correspond with the books each author has written in different tables.
Hierarchical and Network Database Models
The hierarchical model is the oldest database models. It organizes date in a tree-like structure, using parent and child data segments. For example, it begins at the top of the tree with a single root. That stems into a lower level segment, which connects to other subordinate segments after. This is used to model one-to-many relationships. A disadvantage of using this model is that it requires data to be stored repetitively in multiple levels. This causes the database to function very slowly because it can be searching for information in lower levels as well. The network model uses a set structure. A set is comprised of an owner record type, a set name, and a member record type. This type of model shows many-to-many relationships. Parents can have multiple children, and children can have multiple parents. Both of these model types are outdated and no longer used for building new database applications. They are often less flexible than other model types.
Also, all paths for accessing the data must be planned ahead of time and cannot easily be changed. Some places you might still see the hierarchical model might be in large systems that use high-volume transaction processing, like banks or insurance companies.
Object-Oriented Database Models
OODBMSs, like this abstract statue, are more difficult to comprehend initially while ultimately promising greater rewards.
Whereas other database models can only store conventional data (such as dates, numbers, and text), the object-oriented database management system (OODBMS) is far more abstract. In an OODBMS, you can store pretty much any kind of data you desire, along with the methods to be used with that data. To retrieve this more complex and varied data, the user sends queries written in object query language(OQL) which is an object-oriented version of SQL. OODBMSs are becoming increasingly prevalent because of the higher demands of computer users today. However, as is the case with any new technology, there is some resistance because of the downsides of OODBMSs.
One downside is how editing an OODBMS based application is more time consuming because changes have to be made to the other classes in the application that interact with instances of the parent class, versus an RDBMS system where edits can typically be independent of the parent application. This is very time consuming and that means a lot of money has to be spent on making changes to the object-oriented database management system. Many companies in the business world have certain budgets set aside for the information department, which includes the database system used for the company, and the OODBMS is very costly. Another disadvantage for the OODBMS is the lack of support for security and views.
The user of an OOBDMS cannot grant individuals’ access to certain objects or classes within the system, which either means the individual wouldn’t be allowed to see the system at all or that they would get access to everything within the system, something businesses might not like. Also, the OOBDMSs do not contain a view mechanism, which is a disadvantage for employees who like to see their work and also to make sure everything they put in is correct. Two more disadvantages of OOBDMSs that go hand in hand is the lack of standards for the system and the fact that there is no universal data model. Without standards for the system, the cleanliness of the system can be dragged down and it could be hard to use. Many people like when something is universal because then they know what is right and wrong, something that cannot see with the OODBMS. Even with the extra difficulties, many important clients continue to operate using a OODBMS, one big example being Chicago Stock Exchange, which uses the system to manage stock trades.
After looking at the types of database models, there are 4 steps involved with designing a relational database. The first step in designing a relational database is to identify the purpose of the database and the activities that it will be used for. These activities can range from keeping track of rental properties, students grades, customer orders, or inventory. Databases are used in a wide variety of ways and knowing what you will use your database for will help you create your database and optimize its use. In knowing what purpose your database will serve, you will be able to determine the data (fields) that needs to be included in the database, then the fields can be organized into tables. It is good to group fields that logically belong together. Next look at the table structure and ensure that all fields are represented and in the proper table. Look to see if there is any redundancy in the data, that way you can restructure fields in order to minimize that redundancy. Lastly, finalize the structure of each table, listing each field’s name, type, size and so on and selecting a primary key (data definition). This procedure will assist you in create a database that will suit your needs and provide the information you request.
DATABASES ON THE WEB
Web Databases in Use
There are many ways Web databases can be used. The most obvious way is the retrieval of information. Web databases provide a means for users to access the massive amount of information the Web has to offer, and this is made possible, in one way, by the use of search sites where databases provide links for the user. Other personal uses for databases include the storage of email addresses, telephone numbers, and other information for one who might create a site for friends and family.
On the business end, Web databases allow businesses to create “website polls, feedback forms, and client/customer inventory lists.” This is a vital function that both large and small businesses can take advantage of to suite their needs. One, specific example relating to business-use of Web databases is the management of e-commerce-related activities. Here databases are used to provide information like pictures and pricing for products as well as order information and other necessary functions to enable efficient and reliable business transactions. Another feature of Web databases is their ability to display dynamic Web pages. These pages display information that changes depending on the input of the user, like a B2C site showing pages related to the interests of the consumer based on his or her past acivities. From personal to business applications, Web databases are a vital part of addressing the tasks associated with Web-related activity.
Not only are websites becoming more and more personalized for the viewer, but the advertisements on the web page are as well. Companies including major search engine Google deliver targeted ads towards certain content and audiences. One method is contextual targeting, which analyzes keywords, word frequency, and link structures to determine what ads would match the content of the page. Placement targeting uses specific ads chosen by advertisers on certain web pages that are supposed to match what the viewer’s other interests may be and what other kinds of products they have to offer. Similar to this is interest-based advertising, which places advertisements relevant to certain interests on web pages that are commonly viewed by people with that similar interest. Google offers a program that people can use in order to set their interests so that ads are tailored towards their selections.
Lastly, language targeting determines the primary language of the page and ensures that the advertisements shown will be in the same language. Advertisements would not work very well if the viewer could not even read what the product was that they were advertising! All of this information is placed into Google’s ad search database which processes the information and ensures that the advertisement on your screen is going to be relevant to you.
This is a computer software that provides services to software applications beyond those available from the operating system. It is software that connects two otherwise separate applications, which can resemble “software glue.” For example, there are a number of middleware products that link a database system to a Web server. This provides the user to be able to receive data from the data base by using forms that are displayed on a Web browser, and it enables the Web server to return dynamic Web pages based on the user’s requests and profile.
As stated previously, the term middleware is used to describe separate products that serve as the glue between two applications. It is, therefore, distinct from import and export features that may be built into one of the applications. It is sometimes called plumbing because it connects two sides of an application and passes data between them. Distributed computing system middleware can loosely be divided into two categories. These categories are those who provide human-time services and those that perform in machine-time. This latter middleware is somewhat standardized through the Service Availability Forum and is commonly used in complex, embedded systems within telecom, defense and aerospace industries.
How Web Databases Work
In our technological world, we use web-based database requests on a daily basis. We are constantly visiting web pages, clicking on links and using the menu to navigate us through our activity on that page. Using middleware, the web server passes a request on to a database query and the information is stored and passed along to the database server. The database server then uses this information to direct the page to where it was intended to go.
CGI Script is another way information is passed along. They use instructions via a programming language and accept and return the websites data to the user. Active server pages are yet another example of scripts used commonly on websites. They are very similar to CGI Scripts, yet they are exclusive because they almost always use VBS script or Java script.
PHP Hypertext processor is a language that is becoming more and more popular everyday. This script is extremely similar to CGI scripts and active server pages yet are more highly compatible with other programs. The script functions using PHP tags and html codes to get their job done. These scripts are just some examples of what is used today and how information in transmitted on a web server.
A CGI (common gateway interface) script is a set of instructions written in a programming language (such as C, Prel, Java, or Visual Basic) and designed to accept data from and return data to a Web page visitor. On very busy sites, CGI can slow down server response time significantly because it processes each request individually. The usual placement of a CGI script is in the remote web servers cgi-bin directory, but the exact location of this directory is determined by the web administrator for that machine.
Active Server Pages
PHP (PHP Hypertext Preprocessor) is a scripting language that is increasingly being used to create dynamic Web pages. Free to download and use, it utilizes code similar to Perl or C++ that is inserted into the HTML code of a Web page using special PHP tags. Although PHP scripts perform tasks similar to CGI and ASPs, they have the advantage of high compatibility with many types of databases.
Earn a Certificate of Completion for completing this course. Pass a 50-question test on this course with a score of 70 or higher and receive a certificate of completion. Visit our Computer Information Systems Certificate of Completion page for more information.
The text for this course is available from WikiBooks under the Creative Commons Attribution-ShareAlike License.