Presentation is loading. Please wait.

Presentation is loading. Please wait.

Data & Databases Basic Data Fundamentals. Data vs Information l Data: facts Computer systems store data. l Information: facts organized for a specific.

Similar presentations


Presentation on theme: "Data & Databases Basic Data Fundamentals. Data vs Information l Data: facts Computer systems store data. l Information: facts organized for a specific."— Presentation transcript:

1 Data & Databases Basic Data Fundamentals

2 Data vs Information l Data: facts Computer systems store data. l Information: facts organized for a specific application Information is the output of a computer system

3 Data l Atomic Data Data in units that cannot be subdivided First Name, Price, etc. l Binary Large Objects (BLOB) Images and figures Pictures, Cartoons l Objects Data and associated processes Spreadsheet tables, graphics components

4 Atomic Data Most current systems store atomic data. Atomic data is typically made up of characters (letters and numbers) stored in coded groups of 8 bits called bytes. ASCII American Standard Code for Information Interchange EBCDIC Extended Binary Coded Decimal Interchange Code

5 Atomic Data Because atomic variables are made up of a relatively small number of codes, computers can interpret and manipulate them

6 Binary Large Objects These are typically bit mapped pictures or images (such as FAXs) that are stored. Parts of these pictures have meaning (unlike atomic data). Digital pictures, video clips, stored images and signatures are BLOBs. PIXEL blobs are usually stored as pixel codes that represent a point on a video screen

7 Bit Maps 1028 High Resolution 1028 x 640 = 657,920 pixels Black & White = 1 bit per pixel 256 tone Color = 8 bits per pixel 800

8 Image Processing Images cannot be processed easily (other than displayed and scaled) by normal technology and usually require atttached atomic indexes. Text images can be con- verted although the software is not fully reliable.

9 Objects Objects combine data and the processes that manipulate it. An example of an object is a spreadsheet table imported with the manipulation rules. l Encapsulation l Formal Interface for Messages l Inheritance

10 Object Processing Object databases are new technologies with immature design methodologies. They promise extensive code reuse and easy system development if the tech- nology proves itself.

11 Data, Metadata and Business Rules Metadata is data about data, the structure descriptions of the stored files. Metadata includes location, format, field name, data description, etc. Business rules include editing and processing rules as well as automatic procedures that must be processed for accurate data.

12 Data Access Technology l Flat File structures. Data in one location; metadata and business rules in programs l Database Management Systems Data and metadata together; business rules in programs l Object Oriented systems Data, metadata and business rules together

13 Database Approach Program 1 Program 2 Program 3 Meta-Data Data Program 1 Program 2 Program 3 Meta- Data FILE SYSTEM DATABASE

14 Distribution Strategies for Databases Centralized Data and Processing: Dumb terminal with "screen scraping". Intelligent Terminal: Data and processing centralized; data preparation and display on remote devices. Distributed Logic: Data storage distributed; processed at the optimal location. A version of parallel processing. Client Server: Data (usually departmental) maintained on a server. Subsetting occurs on the server, processing on client machines. Distributed Database: Data distributed among different locations; processing access data wherever it is located. Data may be replicated or partitioned.

15 Data Trends l Centralized and Client/Server systems l Multi Layered architectures l Objects and encapsulation l Data driven organizations

16 Functions of a DBMS C.J. Date l Indexing l Views l Security l Integrity l Concurrency l Backup/Recovery l Design l Documentation l Update/Query

17 Views Custom representations of a database that correspond to the needs of a class of users. Stored SELECT statements.

18 Views Views Permit l Maintaining a constant user interface l Restricting access to specified attributes l Specifying user rights

19 Views 3 Schema Architecture PHYSICAL CONCEPTUAL LOGICAL User Views (Views or Queries) Database administrators model for the data (E-R diagrams) Actual data placement and structure (SQL statements)

20 Security Components that limit access or actions to limit potential damage to data.

21 Security Approaches l Views limit access and actions l Authorization Rules identify users and restrict actions l User Defined Procedures in addition to database security functions l Encryption encode stored data l Authentication positively identify users

22 Authorization Rules Some DBMS products authorize actions based on specific records and functional descriptions. However, most DBMS’s limit actions on tables to one of: Read: view but not change Insert: read and add records Update: read, insert and change records Alter/Delete: read, insert, update and delete records, change table structure

23 Authorization Rules

24 Integrity Components that preserve the relationship among different related records in the database

25 Integrity The relationship among records in the database l Referential Integrity l Non Key Integrity l Derived Conditions

26 Concurrency Preventing two users from interfering with each other when they use the same information

27 Concurrency l Lockout Restricting access to users who could be misled by partial transactions l Versioning Making trial updates on versions of the database and denying one if there is a data conflict.

28 Locks Program 1 locks record. No other program can read the record. No program can have an active lock. Program 2 locks record Other programs can read, but not change record. No program can have an exclusive lock.

29 Versioning Version 1 Time 1 Version 2 Time 2 Version 3 Time 3 Commits version 3 only after changes to versions 1 and 2 have been rolled back.

30 Backup and Recovery Processes to confirm and repeat transactions so that database can be restored to a valid state after a problem.

31 Backup and Recovery l Backup Copies Master Transaction Log l Journalization Forward Log Backward Log l Checkpoints

32 DBMS Logs

33 Recover from Backup l Slow l May give different answers from original Backup Transac- tion + = Recovered Database

34 DBMS Logs

35

36

37 Recover to Checkpoint Using Logs Contaminated Database Backward Log - Correct at Checkpoint = Recent Transactions + Recovered Database =

38 Transaction Processing A set of computer operations required to process a single unit of work. A transaction must conclude with the database in a valid state whether the transaction terminates correctly or abnormally

39 Transaction Boundaries l Set Boundary Obtain Locks Execute Code Modules Evaluate Correctness l Commit or Rollback Release Locks

40 Transaction Boundaries Premiere Products Example SALESREPCUSTOMER ORDER-PRODUCT ORDER PRODUCT Place an order for a new customer with a 1500 credit limit

41 Transaction Boundaries Premiere Products Example SALESREP CUSTOMER ORDER-PRODUCT ORDER PRODUCT Insert CUSTOMER Record Update CUSTOMER with SALESREP Foreign Key Insert ORDER Record Insert ORDER-PRODUCT with Foreign Keys Update ProductOnHand in PRODUCT Check Credit Limit

42 DATA


Download ppt "Data & Databases Basic Data Fundamentals. Data vs Information l Data: facts Computer systems store data. l Information: facts organized for a specific."

Similar presentations


Ads by Google