LibreOffice-Suite-Base/C3/Create-tables/English-timed
From Script | Spoken-Tutorial
Time | Narration |
00:00 | Welcome to the Spoken tutorial on LibreOffice Base. |
00:04 | In this tutorial, we will learn how to |
00:07 | Create a Table by |
00:09 | a) Creating Views and |
00:11 | b) Using the Copy method |
00:13 | Lets go to our Library database. |
00:16 | Let us click on the Tables icon on the left panel. |
00:21 | On the right panel, we see three ways of creating a table. |
00:26 | We will go through the ‘Create View’ option now. |
00:30 | Before that, let us learn about Views. What is a View? |
00:36 | A view is similar to a table, but it does not hold the data. |
00:43 | It is defined as a Query Expression, which is simply retrieval of data from tables or other views from the database. |
00:54 | So, when viewed, it has columns and rows of data just like a table. |
01:00 | Views can be used to allow limited access |
01:06 | Or hide the structure and names of the underlying table columns and table data. |
01:13 | For example, we can create a simple view which will list all the members of the library, |
01:21 | And we can leave out their phone numbers to maintain confidentiality. |
01:27 | Here the underlying table would be Members. |
01:32 | Other users of the Library database can be allowed to access this view but not the Members table. |
01:40 | In this way, we can only see the names of the members and not their phone numbers. |
01:46 | Okay, let us go back to the main Base window, and create this view. |
01:53 | Let us click on ‘Create View’ on the right panel. |
01:58 | We see a new window called the View Design and a popup window that says Add tables. |
02:06 | Let us click on Members |
02:09 | And close this popup window. |
02:12 | Now, we are in the View design window. |
02:16 | And we will double click on the MemberId and the Name fields. |
02:21 | Adding the Id field is always useful |
02:25 | Because this helps us to join this view with any other related table, for example the BooksIssued Table. |
02:34 | We can add functions, criteria and sort it any way we want. |
02:40 | But for now, we will sort the member names in ascending order. |
02:45 | For this, let us click on the empty cell in the Sort row under the Name column in the bottom section. |
02:54 | And then click on ‘ascending’. |
02:58 | Let us save our first view. |
03:01 | Here, let us type a descriptive name for this view: View: Members Name Only. |
03:10 | And let us click on the Ok button. |
03:14 | To see the underlying data, let us click on the Edit menu at the top |
03:22 | And then click on Run Query at the bottom. |
03:27 | And we see a new section at the top that lists all the members of the Library in ascending order. |
03:36 | Note that we don’t see any phone numbers. |
03:40 | And there is our simple view. |
03:43 | We can create and design views according to our requirements. |
03:48 | Before moving on to the next topic, here is an assignment. |
03:53 | Create a View of Books Issued to Members and only those books that are not checked in. |
04:01 | Include in the view, the following fields: Book Titles, Member Names, Issue Date, and Return Date. |
04:12 | Name the view as ‘View: List of Books not checked in’. |
04:20 | Okay, let us learn to create tables by using the copy method. |
04:25 | This is an easy way of creating tables, if we know that the table structures are going to be very similar. |
04:33 | For this, let us assume that our Library has DVDs and CDs. |
04:39 | And we can store this data in a new table called Media. |
04:44 | A CD or a DVD can have a title and a publish-year for example. |
04:51 | In order to distinguish between an audio and a video, we will introduce a MediaType field. |
05:00 | Now since the Books table has almost similar fields, we can copy-paste the Books table, |
05:08 | And then we can rename the fields and the table name in the process. |
05:14 | We’ll see how. |
05:16 | Let us go to the main Base window. |
05:19 | Here let us right click on the Books table, |
05:23 | And we will see the copy option. Let us click on it; |
05:28 | And then right click on it. |
05:31 | Notice the various options here. There is a paste and also there is a Paste Special. |
05:39 | We can use copy and paste in a specific format. |
05:44 | Possible formats are Formatted text, HTML or a Data Source Table. |
05:51 | So we can choose the database table here, |
05:55 | Or we can choose Paste from the right click menu. |
05:59 | This opens a wizard and in this window, |
06:03 | We will first rename our table by typing in ‘Media’ against the table name. |
06:11 | In the options, we will click on Definition and Data. |
06:16 | Let us click on the Next button. |
06:19 | In the next window, we will add the columns. |
06:23 | Let us choose BookId, title and publish-year for this demonstration. |
06:29 | Now we will select these fields on the left and use the single arrow button to move them to the right side |
06:39 | and click on Next button. |
06:42 | In the next window, we see our columns. |
06:46 | Here we can rename the fields and change their data types. |
06:51 | We will rename the BookId to MediaId. |
06:55 | And we will click on the Create button. |
06:59 | In the main Base window, there is our new Media table. |
07:05 | Let us now edit the table to add a new field MediaType which will hold the audio or the video type information. |
07:15 | Now we are in the table design window. |
07:19 | Here let us introduce MediaType as the last column. |
07:24 | Let us click on the cell below Publishyear |
07:27 | And enter ‘MediaType’ as Field Name and then choose Text or Field Type. |
07:36 | Now let us save the table design and we are done. |
07:41 | There, we just created our Media table by using the Copy method. |
07:48 | Okay, here is another assignment. |
07:51 | Create a table using the ‘Use Wizard to Create table’ method. |
07:57 | Here, use the ‘Assets’ sample table and rename it to ‘AssetsCopy’. |
08:04 | And explore the various options in this method. |
08:08 | This brings us to the end of this tutorial on Creating Tables in LibreOffice Base |
08:14 | To summarize, we learned how to |
08:17 | Create a Table by
a) Creating Views and b) Using the Copy method |
08:23 | Spoken Tutorial Project is a part of the Talk to a Teacher project, supported by the National Mission on Education through ICT, MHRD, Government of India. This project is co-ordinated by http://spoken-tutorial.org. More information on the same is available at the following link. |
08:44 | This script has been contributed by Priya Suresh, DesiCrew Solutions.
And this is Soundharya, DesiCrew Solutions, signing off.
|