Download presentation
Presentation is loading. Please wait.
Published byHilary Lewis Modified over 9 years ago
1
IE 423 – Design of Decision Support Systems Database development – Building Tables http://crimethinc.com/blog/wp-content/uploads/2007/02/table5big.jpg
2
Important Dates to Remember St. Patrick’s Day – March 17 th
3
By now you should have Read Chapters 1,2,3, 4, 5 and 6 in Pol and Ahuja Also, read chapter 7 in Pol and Ahuja
4
DataBase Development We are going to skip an important topic Normalization …but, will get to this topic very soon
5
DataBase Development Remember that our earlier modeling efforts resulted in the creation of schemas In our modeling we defined entities, relations and relationships In DB development we are interested in Defining the entities = Tables …and their attributes = fields …and the relationships among tables Later we will add data to create instances = records
6
DataBase Development In its native form a table is a data grid with – Columns (fields) Rows (records) Fields have properties Records represent instances of the entity
7
DataBase Development Start Access Either open an existing DB, or… Create a new DB
8
DataBase Development Create a new DB Select Blank database Then define the name and location for the DB file
9
DataBase Development Four ways to create a table Create a table in Datasheet view Create a table in Design view Create a table with the Table Wizard Create a table while importing external data
10
DataBase Development Create a table in Datasheet view
11
DataBase Development Create a new DB Next you should see something like this…. Make the Table Object is selected, then Select Create table by entering data
12
DataBase Development Create a table in Datasheet view Enter the field names at the top of the columns Click close (X) when finished defining the fields You will asked if you want to save the table definition… If you click yes you will be prompted for a name for the table
13
DataBase Development Create a table in Datasheet view … you will also be told that the table has no primary key,… And you will be asked if you want Access to create one for you This is important – but click No for now
14
DataBase Development Create a table in Datasheet view Note: we have a new Table object (People)
15
DataBase Development Create a table in Design view Creating a table in datasheet view is easy, but… It leaves a lot not done For example, each field has a set of properties, and we have not defined them
16
DataBase Development Create a table in Design view Lets create a table to store data about houses Click create table in Design view …and you will see something like this
17
DataBase Development Create a table in Design view Note our field definition panel (top) needs three things – Field Name Data Type Field Description
18
DataBase Development Create a table in Design view Naming rules Max 64 Characters long Any combination of Letters,numbers spaces, except Control characters (ASCII 0-31) Period(.), Exclamation Point (!), Grave (`), Brackets ([]) Leading spaces Quote marks Remember CamelBack notation Leszynski Naming conventions ( from:http://www.acc-technology.com/namconv.htm ) TablestblXxxxXxxx QueriesqryXxxxXxxx FormsfrmXxxxXxxx ReportsrptXxxxXxxx MacrosmcrXxxxXxxx ModulesbasXxxxXxxx
19
DataBase Development Create a table in Design view Field Types Text – max 255 characters (default) Number – storing numeric data – several specific numeric types (field size*) – 1,2,4,or 8 max 16 bytes Long Integer(4), Integer(2), Byte(1), Single(4), Double(8), …. Autonumber – automatically adds a unique number to record Incremental Random
20
DataBase Development Create a table in Design view Field Types Date/Time – to store date and time values Memo – similar to Text except allows very long lengths (65,535 max) Yes/No – Boolean values Currency – values represent money OLE object Hyperlink – Internet address Lookup Wizard – we’ll come back to this
21
DataBase Development Create a table in Design view So, let’s build a table for Houses By the way, try to make it a good design! ?
22
DataBase Development And don’t forget – Define the table’s Primary Key
23
DataBase Development MS Access Table Limits PropertyLimit DB Size2 Gigabytes Table name length64 characters Field name length64 characters Fields in a table255 Table size2 Gigabytes Characters in a record4000 Characters in Field description255 Characters in Text field255 Characters in memo field65,535
24
DataBase Development MS Access Reference Card From http://www.wcu.edu/it/edtech/handouts/access_2003_quick_reference.pdf
25
DataBase Development MS Acess Help and Tutorial from Microsoft http://office.microsoft.com/en-us/access/CH062526191033.aspx
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.