1 / 10

Databases

Databases. Flat file Centralized and distributed databases Record locking Concurrency. Flat File. A relatively simple database system in which each database is contained in a single table . vs

trilby
Download Presentation

Databases

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Databases Flat file Centralized and distributed databases Record locking Concurrency

  2. Flat File A relatively simple database system in which each database is contained in a single table. vs Relational database systems can use multiple tables to store information, and each table can have a different record format.

  3. A "flat-file" database is a database consisting of a single table. A table is composed of a set of fields (columns) and records (rows). You can set up a basic flat-file database table in a wide variety of different types of applications, including a table in a wordprocessor or an HTML document, or a worksheet in a spreadsheetapplication. Many of these types of tables can be sorted by the values in any column; spreadsheet tables can also be queried and manipulated in other ways. These applications are adequate for simple database tasks. Using a dedicated database program, or "database management system (DBMS)", imposes certain other restrictions. You start by defining what fields you want. Each field must be named and declared a specific type (number, string of letters, date etc.) Modern DBMSs usually also allow more exotic data types, such as bitmaps or sounds, as well. One or more fields may be designated key fields. While key fields aren't required, it's always advisable to use them, since they're used by the computer to index the database for rapid searching and sorting. The values in the primary key field must be unique for each record.

  4. Centralized Databases A centralized database has all its data on one place. As it is totally different from distributed database which has data on different places. In centralized database as all the data reside on one place so problem of bottle-neck can occur, and data availability is not efficient as in distributed database.

  5. Distributed Databases "A database that consists of two or more data files located atdifferent sites on a computer network. Because the database isdistributed, different users can access it without interfering withone another. However, the DBMS must periodically synchronize thescattered databases to make sure that they all have consistent data"

  6. Advantages • Management of distributed data with different levels of transparency. • Increase reliability and availability. • Easier expansion. • Reflects organizational structure — database fragments are located in the departments they relate to. • Local autonomy — a department can control the data about them (as they are the ones familiar with it.) • Protection of valuable data — if there were ever a catastrophic event such as a fire, all of the data would not be in one place, but distributed in multiple locations. • Improved performance — data is located near the site of greatest demand, and the database systems themselves are parallelized, allowing load on the databases to be balanced among servers. (A high load on one module of the database won't affect other modules of the database in a distributed database.) • Economics— it costs less to create a network of smaller computers with the power of a single large computer. • Modularity— systems can be modified, added and removed from the distributed database without affecting other modules (systems). • Reliable transactions - Due to replication of database.

  7. Disadvantages • Complexity — extra work must be done by the DBAs to ensure that the distributed nature of the system is transparent. Extra work must also be done to maintain multiple disparate systems, instead of one big one. Extra database design work must also be done to account for the disconnected nature of the database — for example, joins become prohibitively expensive when performed across multiple systems. • Economics— increased complexity and a more extensive infrastructure means extra labourcosts. • Security— remote database fragments must be secured, and they are not centralized so the remote sites must be secured as well. The infrastructure must also be secured (e.g., by encrypting the network links between remote sites). • Difficult to maintain integrity — but in a distributed database, enforcing integrity over a network may require too much of the network's resources to be feasible. • Inexperience— distributed databases are difficult to work with, and as a young field there is not much readily available experience on proper practice. • Lack of standards — there are no tools or methodologies yet to help users convert a centralized DBMS into a distributed DBMS. • Additional software is required. • Operating System should support distributed environment.

  8. Concurrency Concurrency control is a database management systems (DBMS) concept that is used to address conflicts with the simultaneous accessing or altering of data that can occur with a multi-user system. Concurrency control, when applied to a DBMS, is meant to coordinate simultaneous transactions while preserving data integrity. They must preserve the four characteristics of database transactions: atomicity, isolation, consistency and durability.

  9. Record Locking Record locking is the technique of preventing simultaneous access to data in a database, to prevent inconsistent results. The classic example is demonstrated by two bank clerks attempting to update the same bank account for two different transactions. Clerk 1 and clerk 2 both retrieve (ie, copy) the account's current balance. Clerk 1 applies one transaction and refiles the new balance. Clerk 2 applies a different transaction and refiles a new balance that obliterates the information saved by clerk 1. The resulting account balance no longer reflects the first transaction. To prevent inconsistencies created by that kind of unlimited access, the account's record can instead be immediately locked upon being retrieved for any subsequent update. Anyone attempting to retrieve the same record for editing is denied access because of the lock (although, depending on the implementation, they may be able to view the record without editing it). Once the record is saved or edits are canceled, the lock is released, thereby always insuring consistent data within the record being edited.

More Related