Loading....
Coupon Accepted Successfully!

 

Beyond RDBMS

Beyond RDBMS

Distributed Databases (DDB)

A distributed database is a collection of several, logically interrelated database located at multiple locations of a computer network. A distributed database management system permits the management of such a database and makes the operation transparent to the user. Good examples of distributed databases would be those utilized by banks, multinational firms with several office locations where each distributed data system works only with the data that is relevant to it's operations. DDBs have have full functionality of any DBMS. It's also important to know that the distributed databases are considered to be actually one database rather than discrete files and data within distributed databases are logically interrelated.

Object Database Management Systems or ODBMS

Object Database Management Systems or ODBMS

When the capabilities of a database are integrated with object programming language capababilities, the resulting product is an ODBMS. Database objects appear as programming objects in an ODBMS. Using an ODBMS offers several advantages. The ones that can be most readily appreciated are:

1. Efficiency: When you use an ODBMS, you're using data the way you store it. You will use less code as you're not dependent on an intermediary like SQL or ODBC. When this happens you can create highly complex data structures through your programming language.

2. Speed: When data is stored the way you'd like it to be stored (i.e. natively) there is a massive performance increase as no to-and-fro translation is required.

A Quick Tutorial on Database Normalization

Let's start off by taking some data represented in a Table.

Table Name: College Table

StudentName

CourseID1

CourseTitle1

CourseProfessor1

CourseID2

CourseTitle2

CourseProfessor2

StudentAdvisor

StudentID

Tia Carrera

CS123

Perl Regular Expressions

Don Corleone

CS003

Object Oriented Programming 1

Daffy Duck

Fred Flintstone

400

John Wayne

CS456

Socket Programming

DJ Tiesto

CS004

Algorithms

Homer Simpson

Barney Rubble

401

Lara Croft

CS789

OpenGL

Bill Clinton

CS001

Data Structures

Papa Smurf

Seven of Nine

402


(text size has been shrunk to aid printability on one page)

division

The First Normal Form: (Each Column Type is Unique and there are no repeating groups [types] of data)

This essentially means that you indentify data that can exist as a separate table and therefore reduce repetition and will reduce the width of the original table.

We can see that for every student, Course Information is repeated for each course. So if a student has three course, you'll need to add another set of columns for Course Title, Course Professor and CourseID. So Student information and Course Information can be considered to be two broad groups.

Table Name: Student Information

StudentID (Primary Key)
StudentName
AdvisorName

Table Name: Course Information

CourseID (Primary Key)
CourseTitle
CourseDescription
CourseProfessor


It's obvious that we have here a Many to Many relationship between Students and Courses.

 

 

Note: In a Many to Many relationship we need something called a relating table which basically contains information exclusively on which relatioships exist between two tables. In a One to Many relationship we use a foreign key.

 

So in this case we need another little table called: Students and Courses

Table Name: Students and Courses

SnCStudentID
SnCCourseID

division

The Second Normal Form: (All attributes within the entity should depend solely on the entity's unique identifier)

The AdvisorName under Student Information does not depend on the StudentID. Therefore it can be moved to it's own table.

Table Name: Student Information

StudentID (Primary Key)
StudentName

Table Name: Advisor Information

AdvisorID
AdvisorName

Table Name: Course Information

CourseID (Primary Key)
CourseTitle
CourseDescription
CourseProfessor

Table Name: Students and Courses

SnCStudentID
SnCCourseID

 
Note: Relating Tables can be created as required.

 


The Third Normal Form:(no column entry should be dependent on any other entry (value) other than the key for the table)

In simple terms - a table should contain information about only one thing.

In Course Information, we can pull CourseProfessor information out and store it in another table.

Table Name: Student Information

StudentID (Primary Key)
StudentName

Table Name: Advisor Information

AdvisorID
AdvisorName

Table Name: Course Information

CourseID (Primary Key)
CourseTitle
CourseDescription

Table Name: Professor Information

ProfessorID
CourseProfessor

Table Name: Students and Courses

SnCStudentID
SnCCourseID

 

Note: Relating Tables can be created as required.

 

Well that's it. One you are done with 3NF the database is considered Normalized.

Now lets consider some cases where normalization would have to avoided for practical purposes.

Suppose we needed to store a students home address along with State and Zip Code information. Would you create a separate table for every zip code in your country along with one for cities and one for states ? It actually depends on you. I would prefer just using a non-normalized address table and stick everything in there. So exceptions crop up often and it's up to your better judgement.





Test Your Skills Now!
Take a Quiz now
Reviewer Name