Uncategorized

How do you implement one-to-one, one-to-many and many-to-many relationships while designing tables?

One-to-One relationship can be implemented as a single table and rarely as two tables with primary and foreign key relationships. One-to-Many relationships are implemented by splitting the data into two tables with primary key and foreign key relationships. Many-to-Many relationships are implemented using a junction table with the keys from both the tables forming the …

How do you implement one-to-one, one-to-many and many-to-many relationships while designing tables? Read More »

What are the advantages and disadvantages of views in a database?

Advantages:1. Views doesn’t store data in a physical location.2. View can be use to hide some of the columns from the table3. Views can provide Access Restriction, since data insertion, update and deletion is not possible on the view.Disadvantages:1. When a table is dropped, associated view become irrelevant.2. Since view are created when a query …

What are the advantages and disadvantages of views in a database? Read More »