ER diagram for a database of company

Thanks this info was really helpful! I used a webs… Unknown - Jun 2, 2014Thanks this info was really helpful! I used a website called Lucidchart to find er diagram examples and it was really easy to understand. If you use diagrams often you should check it out! Yes its a good and online option. For offline (and online) option, we can also use Microsoft Visio, which is equally good. [Read More]

ER diagram for a database of company

Problem Draw an entity-relationship diagram for a database with companies, people, and professionals (people who work for companies). Solution Entities: Company: companyID, companyName, companyLocation, ect People: peopleID, name, gender, age, etc Professional: professionalID , FK to People, degree, work experience Relations: People ISA Professionl: 1:1 Professional WORKS Company: N:1 People who work for companies are Professionals. So there is an ISA (is a) relationship between People and Professionals (or we could say that a Professional is derived from People). [Read More]

What is denormalization?

Problem What is denormalization? Explain the pros and cons Solution We have already studied normalization here, but now just study opposite of it. Denormalization is the process of attempting to optimize the performance of a database by adding redundant data or by grouping data. Denormalization is generally used to either : Avoid a certain number of queries Remove some joins Lets take an example. Suppose you are working in a team, which is client facing (say in some investment bank), that serves the trade data to the client. [Read More]

Design a database with terabytes of data that supports efficient range queries

Problem You have to design a database that can store terabytes of data. It should support efficient range queries. How would you do it? Solution This rings couple of points in the head. I believe the interviewer was expecting a data structure like hashtable ,B-tree or B+ trees. If we switch to distributed computing based solution, esp when “100 billion records” are involved, I would suggest you to look into Distributed Hash Table and map-reduce (for parallel query processing) [Read More]

What's Database Normalization ?

Normalization is the process where a database is designed in a way that removes redundancies, and increases the clarity in organizing data in a database. In easy English, it means take similar stuff out of a collection of data and place them into tables. Keep doing this for each new table recursively and you’ll have a Normalized database. From this resultant database you should be able to recreate the data into it’s original state if there is a need to do so. [Read More]

What's an RDBMS ?

This concept was first described around 1970 by Dr. Edgar F. Codd in an IBM research publication called “System R4 Relational”. A relational database uses the concept of linked two-dimensional tables which comprise of rows and columns. A user can draw relationships between multiple tables and present the output as a table again. A user of a relational database need not understand the representation of data in order to retrieve it. [Read More]

Types of Databases

Database Classification can be done in 2 ways: 1) On Browsing and Manipulating One way to classify different types of databases is by their function: Analytic Databases Analytic databases (a.k.a. OLAP- On Line Analytical Processing) are primarily static, read-only databases which store archived, historical data used for analysis. For example, a company might store sales records over the last ten years in an analytic database and use that database to analyze marketing strategies in relationship to demographics. [Read More]

What is a Database?

A database is a collection of data. A database could be as simple as a text file with a list of names. Or it could be as complex as a large, relational database management system, complete with in-built tools to help you maintain the data. Before we get into dedicated database management systems, let’s start with the basics - let’s look at a simple text file example. Or it may have rows and columns facility like in spreadsheet. [Read More]